Change WordPress user roles and capabilities Forums Bug Reports Role back to the previous one after user log in

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #6011

    When I change a role for a user, it back automatically to the previous role when he login to the website.

    I’m using
    User Role Editor Pro
    Version: 4.52

    Ultimate Member – User Profile & Membership Plugin
    Version: 2.0.56

    CAS Login in Authorizer
    Version: 2.9.7

    I have been using this recipe for years without any problems, only new users suffer from this issue.

    Please help.


    Look at the code from Authorizer:

    // Ensure user has the same role as their entry in the approved list.
    if ( $user_info && ! in_array( $user_info['role'], $user->roles, true ) ) {
      $user->set_role( $user_info['role'] );

    Thus, if role granted to user is not found at Authorizer’s approved users list, plugin automatically changes it to some pre-approved role. I suppose you need to check some settings in Authorizer plugin.


    Thank you for your quick reply.

    Authorizer settings:
    Who can log into the site?
    All authenticated users (All external service users and all WordPress users)

    All users automatically added to the Authorizer approved users’ list.

    I think there is a conflict between the Ultimate Member Roles and User Role Editor Pro. Please let me know if you have any suggestions to troubleshoot this issue.


    I did not hear about conflict between UM and URE yet. May be it’s the 1st time.
    Did user whose role is changed logged in earlier? May be he was included already into approved users’s list with older role and now Authorizer replaces his new role with older (approved) one? Can you test absolutely new user with new role who did not login with Authorizer yet?

    Is it possible to exclude user with changed role from Authorizer approved users list? May be you have to do this, in order such user get new role at the approved users list after the next login, but not the older one?


    Other possible conflict with Authorizer – it uses ->set_role() in assumption that user always has the single role. It may be a problem when user has multiple roles and there are no approved role between them.


    I’ll disable this code of Authorizer and check again


    Thank you Vladimir for your response. I just disabled Authorizer from a few weeks ago and everything is fine now. I am using Authorizer for years without any issues, I know it is a conflict between Authorizer and another plugin. I appreciate your reply, Thank you.


    Thanks for letting me know.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.