-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Multi-Role implementation #161
base: master
Are you sure you want to change the base?
Conversation
Thanks! We'll review this with the goal of including it in the next version. I think it might need to be more comprehensive, since there are some other functions in the codebase that handle syncing roles between Authorizer and wp_usermeta, such as if the role is edited in the WordPress User screen instead of in Authorizer Settings. Also an extra layer for multisite support. Can you let us know if you use another 3rd party plugin for multi-role support? We can review that as well to make sure this method uses the proper hooks. We'll also let you know if there are any changes that will affect your example hook. For example I think it's likely that we'll use named parameters on the return value, something like: return array(
'role' => $default_role,
'roles_to_add' => $add_role,
'roles_to_remove' => $remove_role,
); For context, there are two reasons we haven't implemented this yet:
|
Hi there.
|
Thanks! For reference in (1), the issue with WordPress core is that if you edit a user's role in the admin dashboard (either editing their profile, or using the bulk action), the single role you choose there will overwrite any multi-roles. I believe 3rd party plugins (like URE Pro) modify this behavior. The issue for us is that we try to sync Authorizer roles with any changes made via those core interfaces, and we use the Regardless, we'll try to find some time to inspect the free version of User Role Editor and see if we can find some common ground to support your use case. |
Added backward compatible multi-role implementation. An example of a modified snippet which would take advantage of this is:
Also want to commend you guys for creating this. I didn't want to get nickled and dimed by miniorange and this works perfectly. Thank you to both the university and maintainers for creating something awesome!