finding out user_level
-
hi,
On my site, http://www.plugin.com, i need to list users who are authors only in the sidebar widget on the home page. i created a new sidebar widget (Companies) for this but cant seem to get the user_level data back from the bp_core?
i created the following routine in bp_cure
function bp_core_get_userlevel( $user_id) {
$user_info = get_userdata($user_id);
//debugging
echo(‘Username: ‘ . $user_info->user_login );
echo(‘User level: ‘ . $user_info->user_level );
echo(‘User ID: ‘ . $user_info->ID );
return $$user_info->user_level;
}
its being called in bp-core-widgets.php like this
<div class=”item-meta”><span class=”activity”><?php echo bp_core_get_userlevel( $user->user_id ) ?></span></div>
But i cant get it to return the userl_level. With the debugging on, it returns user_login and ID but user_level is always empty/blank?
I have tried every other possible way to do this but cant seem to get it to work.
Any help would be greatly appreciated
thanks
karsten
- The topic ‘finding out user_level’ is closed to new replies.