function pc_get_userrole ($user_id) {
$user = new WP_User($user_id);
$userclean = $user->roles[0];
return $userclean;
}
Buna şöyle çağırın:
echo pc_get_userrole(bp_current_user_id());
function pc_get_userrole ($user_id) {
$user = new WP_User($user_id);
$userclean = $user->roles[0];
return $userclean;
}
echo pc_get_userrole(bp_current_user_id());