Keyword

User Extended Fields: Specific field only for user

  • Tibbe van Asten
  • Tibbe van Asten's Avatar Topic Author
  • Offline
  • Junior Member
More
9 years 10 months ago #133905 by Tibbe van Asten
I like the extension User Extended Field and with some help of you guys I got it working quite well.

Now I have another question:
How can I make it possible to show some specific field only on the public profile page, when it's the users own profile. For example: When I login I want to see my own birthday, but others can't see my birthday when the check out my profile.

In default.php from the UserExtendField plugin I already tried this:
<?php if(JRequest::getInt('id') == $user->id) ?>

The 'JRequest::getInt('id') is right, but $user->id gets me the wrong id from the k2_users table. In this table there is a column 'id' and a column 'userID' and I want to grab the 'userID'.

I hope there is someone who can help me with this!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 10 months ago #133919 by Krikor Boghossian
Replied by Krikor Boghossian on topic User Extended Fields: Specific field only for user
You can show/hide this information by using Joomla!'s user function.

docs.joomla.org/Accessing_the_current_user_object

In this post you will see the how this function is used to get a specific user.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum