1. dlh
  2. Features Request
  3. Monday, June 24 2019, 03:45 PM
Good afternoon,
I am create my social network with your plugin but I have a custom field (in Easy Profile) named "Activity" which is consisting to display the user's type. I would like to display this value on the user's pages (inside the bottom bar under the cover (/View/Elements/cover.cpt). For example , when I go on a Registered users's page, I would like to see "Registererd". But when I go on an admin page, I would like to see the content of the custom field ("Admin" as it is save inside the custom field in Joomla's user's manager).
I tried to integrate this code :

div class="jsn_featured_infoval"><i class="icon-picture icon"></i> <?php $user=JsnHelper::getUser(); echo $user->activite ?>

It displays on the good place but all the users is seeing his own statut on all the user's page. I want that every users see the good statut on each user's page
Is it possible?
Thanks for your understanding and your help,
King regards,
Yann Arnould
dlh Accepted Answer
PS : I forgot to close my <div>
  1. more than a month ago
  2. Features Request
  3. # 1
admin Accepted Answer
Admin
Hi,
this happen because code like JsnHelper::getUser() return current logged-in user, you should use some code like:
<?php $tmpUser=JsnHelper::getUser( $user['User']['id'] ); echo $tmpUser->activite; ?>


NOTE: I have used variable called "$tmpUser" because "$user" variable is already used.
  1. more than a month ago
  2. Features Request
  3. # 2
  • Page :
  • 1


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