Change WordPress user roles and capabilities › Forums › Bug Reports › Role back to the previous one after user log in
Tagged: conflict, Ultimate Member
- This topic has 7 replies, 2 voices, and was last updated 5 years, 1 month ago by Vladimir.
-
AuthorPosts
-
14/10/2019 at 06:19 #6011Ssy3Participant
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.52Ultimate Member – User Profile & Membership Plugin
Version: 2.0.56CAS Login in Authorizer
Version: 2.9.7I have been using this recipe for years without any problems, only new users suffer from this issue.
Please help.
14/10/2019 at 11:54 #6012VladimirKeymasterLook 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.
14/10/2019 at 12:20 #6014Ssy3ParticipantThank 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.
14/10/2019 at 12:30 #6015VladimirKeymasterI did not hear about conflict between UM and URE yet. May be it’s the 1st time.
But…
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?
14/10/2019 at 12:33 #6016VladimirKeymasterOther 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.
14/10/2019 at 12:50 #6017Ssy3ParticipantI’ll disable this code of Authorizer and check again
12/11/2019 at 05:46 #6099Ssy3ParticipantThank 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.
13/11/2019 at 12:46 #6104VladimirKeymasterThanks for letting me know.
-
AuthorPosts
- You must be logged in to reply to this topic.