Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-15T15:09:41-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14446 2011-08-15T15:09:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14446&p=31563#p31563 <![CDATA[Re: Dynamically populated field]]> WP Admin -> s2Member -> API / Scripting -> s2Member PHP/API Constants -> S2MEMBER_CURRENT_USER_ACCESS_LEVEL or S2MEMBER_CURRENT_USER_ACCESS_LABEL

Or do you need to find the level for a user that's not the current one?

Statistics: Posted by Cristián Lávaque — August 15th, 2011, 3:09 pm


]]>
2011-08-14T20:48:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14446&p=30783#p30783 <![CDATA[Re: Dynamically populated field]]> http://wordpress.org/support/topic/how- ... rrent-user.

Code:
<?php
global $current_user, $wpdb;
$role = $wpdb->prefix . 'capabilities';
$current_user->role = array_keys($current_user->$role);
$role = $current_user->role[0];
echo $role;
?>


It's kind of complex since WordPress doesn't have a built-in function for that. I'm not sure why.

Hope I helped!
:D

Statistics: Posted by Bruce C — August 14th, 2011, 8:48 pm


]]>
2011-08-14T18:39:18-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14446&p=30781#p30781 <![CDATA[Dynamically populated field]]> Thanks,
Jen

Statistics: Posted by mochajen — August 14th, 2011, 6:39 pm


]]>