Forum Replies Created
-
AuthorPosts
-
Vladimir
KeymasterI 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:08 in reply to: How do I change the bbp-role to display the name of the role? #6013Vladimir
KeymasterURE creates/edits user roles via WP API or directly in WP database.
Every role has 2 attributes: id and name in terms of URE’s user interface or in terms of WP API name (id) and display_name (name).
Look at the wp-includes/class-wp-roles.php:public function add_role( $role, $display_name, $capabilities = array() ) { if ( empty( $role ) || isset( $this->roles[ $role ] ) ) { return; } $this->roles[ $role ] = array( 'name' => $display_name, 'capabilities' => $capabilities, ); if ( $this->use_db ) { update_option( $this->role_key, $this->roles ); } $this->role_objects[ $role ] = new WP_Role( $role, $capabilities ); $this->role_names[ $role ] = $display_name; return $this->role_objects[ $role ]; }WP_User object which you can get from wp_get_current_user() contains roles property, which contains the list (array) of roles (ID) granted to user.
Vladimir
KeymasterLook 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.
12/10/2019 at 04:01 in reply to: How do I change the bbp-role to display the name of the role? #6008Vladimir
KeymasterThanks for the information.
Does ‘x-bbp’ or ‘x-sidebar’ tell you something? Something related to a theme or plugin, which change bbPress default representation? We should look there in order to find place where it output author role as a Member.
Is ‘Member’ a primary role of this user?12/10/2019 at 02:50 in reply to: How do I change the bbp-role to display the name of the role? #6006Vladimir
KeymasterHi,
It may depend from a theme or additional plugins you use. Show screenshot to give me more information.
Mine test bbPress shows at forum only user name. It shows role at user profile after click on the user name and it’s a role name not ID: “Forum Role: Participant”.
Vladimir
KeymasterCheck what exact ID your custom post type CPT really has. Pay attention that while we talk ‘posts’, post type ID is ‘post’. So I suppose that your CPT is ‘scholarship’, not ‘scholarships’.
With this assumption in mind try this version of a code:if (current_user_can('scholarships')) { // Role ID if ($post_type=='scholarship') { // CPT ID $restrict_it = false; } }Vladimir
KeymasterIt should work, with little tuning.
Try to exclude ‘scholarship’ CPT from edit restrictions using ‘ure_restrict_edit_post_type‘ filter.Vladimir
KeymasterWhen you 1st time enable this add-on you need to “learn” it: open post editor page, then page editor page to show what meta boxes exist at your site. Re-check the list of meta boxes listed by add-on after that.
Vladimir
KeymasterRe-check if this role and/or user with this role has active edit restrictions. May be deactivate ‘Edit restrictions’ add-on temporally for quick test.
Vladimir
KeymasterYes, it’s possible. You can block for selected role “Publish (submitdiv)” meta box under ‘Page’ and ‘Post’ sections using this add-on.
Vladimir
KeymasterHi Meredith,
URE Pro includes this feature. Look at the “Settings->User Role Editor->Tools” tab. Try “Export” button.
Vladimir
KeymasterTurn ON special option “Show Administrator role at User Role Editor” at “Settings->User Role Editor->General” tab in order to see “Administrator” role in the URE’s roles drop-down list.
Vladimir
KeymasterHi,
When you add new CPT with a default ‘edit_posts’ capability, URE should add this CPT own capabilities to ‘administrator’ role automatically, at least when you open User Role Editor. ‘administrator’ role should get access to all CPTs after that. If it’s not happened you still can add needed capabilities to ‘administrator’ role manually. Check if ‘administrator’ role has full list of capabilities under ‘Custom Post Types’ group.
Vladimir
KeymasterThanks for letting me know that you found a solution more suitable for your use case.
Generally, when URE forces CPTs to use own capabilities, it does this for all CPTs with default ‘edit_posts’ capabilities set. So CPT ‘video’ will use ‘edit_videos’ instead of ‘edit_posts’, etc. And if role does not have ‘edit_videos’ capability it does not have access to ‘Videos’ CPT, even if role still has ‘edit_posts’ capability.
09/10/2019 at 02:49 in reply to: Give a role access to edit a spesific menu in Appearance > Menu #5984Vladimir
KeymasterHi Rob,
It’s still not realized. Thanks for a remind.
-
AuthorPosts