User role on profile page – UserPro Forums https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/feed/ Sat, 27 Apr 2024 15:55:56 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24213 <![CDATA[User role on profile page]]> https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24213 Wed, 05 Mar 2014 03:51:07 +0000 Manos Hello, is it possible to get the user role in the user profile? What i mean is that i want to show different things for an administrator and different things for a subscriber.

]]>
https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24241 <![CDATA[Reply To: User role on profile page]]> https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24241 Wed, 05 Mar 2014 06:29:34 +0000 admin You can do conditional php coding based on user role. Do you understand the basic concept? Example, run a php condition if user’s role is admin -> show something, etc.

Aside from this, you can use the feature: http://userproplugin.com/userpro/wp-admin/admin.php?page=userpro&tab=fieldroles

Role-based fields

]]>
https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24315 <![CDATA[Reply To: User role on profile page]]> https://forum.userproplugin.com/forums/topic/user-role-on-profile-page/#post-24315 Wed, 05 Mar 2014 17:30:31 +0000 Manos Yes I get it. But I can’t access the link you sent me (You do not have sufficient permissions to access this page.). I think it’s only for admin.

So I created a page in my template’s folder. What you suggest is to check the user’s role(not the current logged in user but the one in their profile) and if he is for example an “administrator” to show something. If not an “administrator” don’t show this.

The issue i’m having is that I can’t get the user’s role. For example that profile (http://www.domain.com/profile/Pit). How can I check if “Pit” is an “administrator”?

Thanks a lot for your quick reply!

]]>