Forum Replies Created

Viewing 15 posts - 2,371 through 2,385 (of 2,506 total)
  • Author
    Posts
  • in reply to: Block front-end options #1367
    Vladimir
    Keymaster

    In order to have a role, a user should login 1st. Not logged in user can not have any role.
    As home page is available to the public I offer you replace those links for not logged in users with the registration/login links.
    And add a filter for automatic redirection after login to the restricted page according to the assigned role. Like this:

    add_filter('login_redirect', 'redirect_user_after_login', 10, 3);
    function redirect_user_after_login($redirect_to, $request, $user) {
        
        if (isset( $user->allcaps ) && is_array( $user->allcaps )) {
            //check for admins
            if (!empty($user->allcaps['administrator'])) {
                // redirect them to the default place
                return $redirect_to;
            } else if (!empty($user->allcaps['candidate'])) {
                $redirect_to = home_url() .'/post-resume';
            } else if (!empty($user->allcaps['employer'])) {
                $redirect_to = home_url() .'/post-job';
            } else {                                                                                            
                return home_url();
            }
        } else {
            return $redirect_to;
        }   
    }
    
    in reply to: Block front-end options #1365
    Vladimir
    Keymaster

    Hi,
    If you set any view restriction for the post, that becomes unavailable for public visitors or not logged in users. In other case a user with role ‘candidate’ may log out and easy post a job as not logged in user.
    I suppose that not logged in users should not have right to send as job, as resume at your site.

    in reply to: Restrict Menu items (appearance) #1362
    Vladimir
    Keymaster

    Hi,

    Please show on a screenshot to what menu do you wish to restrict access?

    in reply to: Blocking page options #1358
    Vladimir
    Keymaster

    There are no such options in URE. These metaboxes are not managed by user capabilities. So you need to add custom code to remove metabox for selected role. Like this for page attributes:

    function remove_page_metaboxes() {
    if (current_user_can('some_role')) {
       remove_meta_box('pageparentdiv', 'page', 'side');
    }
    }
    add_action('admin_menu', 'remove_page_metaboxes');
    
    in reply to: How to block menu items; not working #1355
    Vladimir
    Keymaster

    Very good news. Thanks for the help with tests.
    I hope now that I will publish Pro version 4.18 soon.

    in reply to: Change Role of none to subscribers not working #1353
    Vladimir
    Keymaster

    Thanks for the information.
    40000 users is an interesting experience. I never tested URE’s code against so strong users quantity. You met PHP script interruption for the reason of script time execution limit, probably.
    I will try to find a decision and inform you then.

    in reply to: How to block menu items; not working #1352
    Vladimir
    Keymaster

    Hi,

    Please try version 4.18.b8. You may download it after login from this page:
    https://www.role-editor.com/download-plugin/

    in reply to: Restrict Access to User Assign Categories #1351
    Vladimir
    Keymaster

    This plugin uses deprecated user levels.
    Update it manually:
    replace

    add_submenu_page('users.php', 'UserCategory', 'User assign categories', 10, basename(__FILE__), array('UserCategory', 'uscat_form'));
    

    with

    add_submenu_page('users.php', 'UserCategory', 'User assign categories', 'delete_users', basename(__FILE__), array('UserCategory', 'uscat_form'));
    

    and this menu item will become available at “Admin menu” dialog of User Role Editor.

    in reply to: Add new forum menu item gone #1350
    Vladimir
    Keymaster

    Yes. Turn on or add manually to the administrator role the user capabilities from the 2nd column of this screenshot
    http://storage.googleapis.com/role-editor/downloads/support/tablepress-menu-capabilities.png

    in reply to: How to block menu items; not working #1346
    Vladimir
    Keymaster

    Hi,

    Thanks for the feedback and detailed explanation. I see now that it could be a valuable extension to this add-on functionality. I will contact you soon (1-2 days) with ask to test the updated version.

    in reply to: Add new forum menu item gone #1345
    Vladimir
    Keymaster

    I made screenshot from “Admin menu access” add-on opened for ‘Administrator’ role at User Role Editor:
    https://www.role-editor.com/block-admin-menu-items
    But menu should be available in order to see it at “Admin menu” window.

    I suppose that you may lost shown TablePress capabilities somehow. Check if they included to your ‘Administrator’ role. If not, try to reactivate TablePress plugin. In case it will not recreate its capabilities during activation, try to add them to ‘Administrator’ role manually.

    in reply to: How to block menu items; not working #1341
    Vladimir
    Keymaster

    Hello!

    Admin menu is shown for Administrator role in readonly mode by design. Thus you can not block menu items for Administrator role.

    Do you think it will be useful to allow to use this add-on for Administrator role too, in case you are a superadmin at WordPress multisite?

    in reply to: Where is the shortcode documentation? #1340
    Vladimir
    Keymaster

    Those shortcodes work inside post or page content only:
    https://www.role-editor.com/shortcode-content-view-access-restriction/

    This plugin may help you a lot with widgets conditional hide/show:
    http://wordpress.org/plugins/dynamic-widgets

    in reply to: Add new forum menu item gone #1339
    Vladimir
    Keymaster

    As about TablePress, I see its menu with active URE. Check if your administrator role includes these capabilities:
    http://storage.googleapis.com/role-editor/downloads/support/tablepress-menu-capabilities.png

    in reply to: Add new forum menu item gone #1338
    Vladimir
    Keymaster

    If you turned on ‘Activate “Create Post/Page” capability’ option at ‘Additional Modules’ tab of URE Settings, then you need to turn on ‘create_posts’, ‘create_pages’ for Administrator role.

    What plugin do you use for a forum?

Viewing 15 posts - 2,371 through 2,385 (of 2,506 total)