Billy, Your Time will Expire on:
Sunday January 1st, 2012
Your account is currently set to: subscriber
(If the user is set role subscriber I want the text displayed to say "Inctive"}
Billy, Your Time will Expire on:
Sunday January 1st, 2012
Your account is currently set to: s2member_level2
(If the users role is set to s2member_level2 I want "Active Displayed)
I am using this code in my functions.php
- Code: Select all
function get_user_role() {
global $current_user;
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
return $user_role;
}
and using this in my footer.php where the message is shown to the users.
- Code: Select all
<?php echo get_user_role(); ?>
I hope someone can help me with this issue Ive been trying my best to figured it on my own but need someone to lead me in the right direction.