Title: Get_role
Last modified: July 19, 2019

---

# Get_role

 *  [Nitrat](https://wordpress.org/support/users/nitrat/)
 * (@nitrat)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/get_role/)
 * Hello!
    I now have Version 1.3.88 installed. If I update the plugin to the current
   version, the problems begin – the pages where there is a shortcode for UM, are
   unavailable – there is a technical problem on the site. Here is a sample code
   from your documentation. One line is noted. And before the upgrade, it worked
   fine. So, in the disabled function does not work after the update get_role ()
   And if you unwind this line, the site will be posted with an inscription about
   temporary technical difficulties. If you login.
 *     ```
       $current_user = wp_get_current_user();
       $user_id = $current_user->ID;
   
       if ($user_id) {
       	global $ultimatemember;
   
       	$umRoleName = "N/A";
       	um_fetch_user( $user_id );			
   
       	// $umRoleName = $ultimatemember->user->get_role();
           echo $umRoleName;
       }
       ```
   

The topic ‘Get_role’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [get_role](https://wordpress.org/support/topic-tag/get_role/)

 * 0 replies
 * 1 participant
 * Last reply from: [Nitrat](https://wordpress.org/support/users/nitrat/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/get_role/)
 * Status: not resolved