1. dlh
  2. Features Request
  3. Wednesday, June 17 2020, 02:12 PM
Hi there,
I created a new section on the profile pages (as you said here : https://www.easy-profile.com/support/add-pages-inside-the-left-user-page-s-menu.html). Now, I would like to display a field of the user's profile which is display.
I made the code bellow, however it displays always the field information of the viewer (so mine) even if I go on another profile.


<?php
$tmpUser=JsnHelper::getUser( $user['User']['id'] );
$varbadge=$tmpUser->badges;
echo $varbadge;
?>


Thanks in advance for your help,
Best regards,
Yann Arnould
Accepted Answer
admin Accepted Answer
Admin
Hi,
I need to understand in which file you have put the code. The code at the topic at https://www.easy-profile.com/support/add-pages-inside-the-left-user-page-s-menu.html should work in the file Users->view.ctp but it could not work in another file
  1. more than a month ago
  2. Features Request
  3. # Permalink
admin Accepted Answer
Admin
Hi,
can you please specify me where you put this code?

Probably the variable $user['User']['id'] is not valid, so the function getUser return always current logged in user.
  1. more than a month ago
  2. Features Request
  3. # 1
dlh Accepted Answer
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 2
dlh Accepted Answer
Hi,
The file is a file I created which called "ajax_mfr24.ctp" ; it is located inside Users as "view.ctp".
  1. more than a month ago
  2. Features Request
  3. # 3
admin Accepted Answer
Admin
Hi,
unfortunately for me is not clear what load this file, it is loaded from the Controller?
  1. more than a month ago
  2. Features Request
  3. # 4
dlh Accepted Answer
Content Protected
  1. more than a month ago
  2. Features Request
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.