Guest User

get current user role

a guest
Mar 22nd, 2016
299
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     if(is_user_logged_in()) :
  3.         $user_role = $current_user->roles;
  4.         echo $user_role[0];                
  5.     endif;
  6. ?>
RAW Paste Data