User Role Editor version 3.7 is published

User Role Editor

User Role Editor


User Role Editor WordPress plugin version 3.7 is published at June 23rd, 2012. What’s new?
- ‘Select All’, ‘Unselect All’, ‘Inverse’ buttons were added to the from for more convenient capabilities management while role editing.
- Role and capability name could be started from digit, and underscore ‘_’ character. Hyphen ‘-’ character could be included into such name too.
- Old versions used ‘edit_users’ capability to check if show/hide ‘User Role Editor’ menu item under ‘Users’ menu. Starting from version 3.7 ‘administrator’ role is checked. Existed inconsistency, when non-admin user with ‘edit_users’ capability saws ‘User Role Editor’ menu, but got ‘Only Administrator is allowed to use User Role Editor’ error message, was removed.
- Bug fix: if you work with WordPress admin via https, URE will use https instead of http, as it made in older versions.
As new text was added to plugin main form, translations for all languages wait for updates. Former and new translators are welcome!

Tags: , ,

  • sebweb

    Erreur fatale :
    user-role-editor/user-role-editor.php

    function ure_init() {
    global $current_user, $wp_roles;
    $role = $wp_roles->get_role(‘administrator’); if (!$role->has_cap(URE_KEY_CAPABILITY)) { $wp_roles->use_db = true; //$role->add_cap(URE_KEY_CAPABILITY); }

    ===> $role = @get_role(‘administrator’);

  • http://shinephp.com Vladimir Garagulya

    Thanks for the bug report and suggested fix variant. I fully removed that code as unnecessary and published version 3.7.1. Just update and test.

  • sebweb

    tout est ok

    thanks…

  • TimTech

    Hey I like the plugin; it has great documentation and it is easy to use to change permissions. I use it a lot.
    - TimTech

    PS My site is timtechsoftware.com

  • chady

    hi Vladimir,

    I like ur plugin, I found out when I add user and activate –> delete
    post (checked) to delete post it wont delete although theres no delte
    option only Move to Trash but It wont move to trash either. Any solution
    would be helpful. Thank You.

    My site is: http://chadypantaleon.comoj.com/

  • http://shinephp.com Vladimir Garagulya

    Hi Chady,

    Concerning ‘delete_posts’ capability, read this post
    http://www.shinephp.com/delete-posts-and-pages-wordpress-user-capabilities-set/

    Key capability to be capable delete your own posts is ‘edit_posts’ capability.

  • http://www.strategic-concepts.us/ Eric Langley

    Vlad,

    I love this plugin and installed the update. For the Default Role, should this work for signups through the Register page?

    ~eric

  • http://shinephp.com Vladimir Garagulya

    Yes, Eric, you are right. New registered user (including signup through the Register page) should get the role, you selected as default one with URE plugin.

  • http://www.strategic-concepts.us/ Eric Langley

    Okay, hopefully you can help me out. I am registering test users on a WP Multisite Subsite they are not receiving the Default Role when I view them in wp/admin/users. They do not show up at all.

  • http://shinephp.com Vladimir Garagulya

    Hi Eric,

    Excuse me, I was wrong. By default new user registered at WordPress mulitisite is assigned to network account only and should be assigned to subsites by their admins manually. I think this goes from idea, that user could be registered with right to create his own sites. So there is no need for him to be assigned to any other subsites except his self-created subsites.
    If you need, that new registered user assigned to main blog of your network or some selected subsites, you can use this plugin for that:
    http://wordpress.org/extend/plugins/wpmu-default-user-role/
    But it could be outdated. I think you get general idea.

    Thanks for your question. You helped me to remember, how URE works with default role for multisite network. When you change default role for main blog of the network, any new created subsite gets its default role value from the main blog one. Thus, when you add new user to such site, new user will get that default role automatically.

    Regards,
    Vladimir.

  • http://www.strategic-concepts.us/ Eric Langley

    Vladimir,

    Thank you for taking a look at this. Do you think it is possible to create a plugin that does the following:

    When a new user registers for the first time on a Multisite subsite a default Role is assigned to that new user for that site?

    I want users to be able to Register on a subsite, receive a Role for that site and also a Role for the Primary site, but no other sites.

    Why do I want this? I want Multisite Privacy to work without having to add users manually to each account. Right now any user can log into any site with Subscriber privileges, not secure enough for my needs…

    Plugins like the one your mentioned and Multisite User Management do not do this.

    Thanks,

    ~eric

  • http://shinephp.com Vladimir Garagulya

    Hi Eric,

    I’m sorry, according to result of my short investigation there is no fast and easy way to provide such functionality for user registration. Problem is that, you never know, for what subsite user desired to register.
    wp-signup.php has this code at very begin, from line 25:

    if ( !is_main_site() ) {
    wp_redirect( network_home_url( 'wp-signup.php' ) );
    die();
    }

    Thus, even if user click ‘Register’ link from subsite, e.g.
    http://mainsite.com/subsite1/wp-signup.php,
    WordPress will redirect him to main site any way. User will go to
    http://mainsite.com/wp-signup.php

    After that you have not information about subsite where to add new registered user.

    Regards,
    Vladimir.

  • http://www.strategic-concepts.us/ Eric Langley

    Vladimir,

    Thank you for taking the time to look at this.

    One possible solution would be to intercept the registration link with a form that asks for the username the user wants to use and update a table that keeps track of which site the user is signing up on then post the username to the wp signup page for the user. There would also need to be logic to add the Role to the site after the user activates their account.

    This plugin could also check to make sure the username is available/allowed.

    ~eric

  • http://shinephp.com Vladimir Garagulya

    Thanks for idea. If you could not make it here, just start from other point. I think, it’s possible to use custom link for user registration, which will lead to the plugin’s produced signup page, which will save needed data about subsite to register, then proceed WordPress default way. I will not promise to make such plugin much quickly, as I busy now on other task, but I will try to realize it, may be in a month.

  • http://www.strategic-concepts.us/ Eric Langley

    Vlad,

    Thanks for the response, again. This conversation is going a long way to helping solve my problem.

    I was looking at the email that I receive as the Administrator of sites when users complete their registration. It contains the following;
    WP sends a notification email to the site administrator of a site when a new user is added. It is subsite specific. Therefore WP knows which site a user registered on, somewhere…

    Anyway, this email comes with the following data:
    Return-Path: noreply@sitename,
    thus containing the site name of the site that the user registered on.
    And the Subject: New User Registration: username

    So this is one way to determine which site a user registered on. The email could be parsed for the sitename and username and then add the Default Role.

    ~eric

  • http://shinephp.com Vladimir Garagulya

    1) When user registered, he got ‘Activate [user name]‘ message from WP with activation link.
    2) When user clicks on activation link, he got ‘New [default site name] Sites user: [user name]‘ message with user name, password and login link to the default site.
    That’s all emails for that moment.

    In order to get role for any subsite user needs a help from admin. Admin should add user to some site manually. Just after that admin will get email, you wrote about. Right? But you wish, that new user will be added to selected site automatically.
    Correct me, if I’m wrong.

  • http://www.strategic-concepts.us/ Eric Langley

    Vlad, Please see my comments below…

    Vlad>
    1) When user registered, he got ‘Activate [user name]‘ message from WP with activation link.
    Eric> Yes,
    2) When user clicks on activation link, he got ‘New [default site name] Sites user: [user name]‘ message with user name, password and login link to the default site.
    That’s all emails for that moment.

    Eric> Plus one more, the site Administrator receives an email notification of the new user account (after they click the Activation link in the email) with the data I noted above; Return-Path contains site name and Subject contains username.

    So this data exists in WP somewhere, possibly in wp_signups in the meta field? This table also has domain, path and title fields but they do not seem to be used?

    Vlad>
    In order to get role for any subsite user needs a help from admin.
    Eric>

    Yes, currently users need manual intervention from the Admin to be assigned a Role.

    Very inconvenient!

    Vlad>
    Admin should add user to some site manually. Just after that admin will get email, you wrote about. Right?
    Eric> Actually the admin receives the email after the user clicks the Activation link in the email they receive.

    Vlad>
    But you wish, that new user will be added to selected site automatically.
    Correct me, if I’m wrong.

    Eric> Yes, I want the Default Role (specified on a site-by-site basis in Multisite) to be added automatically.

    Thanks,

    ~eric

  • http://shinephp.com Vladimir Garagulya

    I understood you. Thanks for the details.
    But email I got from my test MS-WP-site has wordpress@default-site as Return-Path in its data. I have a little experience with wordpress multi-site as I don’t support any real ms-site myself. I will play more with my test playground…

  • http://www.strategic-concepts.us/ Eric Langley

    Vlad,

    You wrote:
    email I got from my test MS-WP-site has wordpress@default-site as Return-Path in its data.

    I note:
    Did you Register on the Primary site or a subsite?

    If you Register on a subsite the Return-Path: should show the email as entered in Advanced Email Options (Settings/Email) with ‘Set the return-path to match the From Email’ checked.

    Note: I use SMTP (with Gmail) not PHP mail as set in Settings/Email

    Note: There are two ‘Return-Path:’ entries in the email header. The second one contains the subsite data.

    ~eric

  • http://shinephp.com Vladimir Garagulya

    Yes, I registered at subsite and I have both ‘Return-Path’ and ‘From’ values equal to default site.

    Interesting, I didn’t ever see Email sub-menu under Settings, neither at subsite, nor at Network Admin. Is it possible that you have some active plugin to manage your advanced email options?

  • http://www.strategic-concepts.us/ Eric Langley

    Vlad,

    I am using the plug-in WP-Mail-SMTP. http://wordpress.org/extend/plugins/wp-mail-smtp/
    It’s pretty cool. There are many others that do similar functions.

    ~eric

  • Jakub Sejkora

    Hello, I am using this plugin and I really like it. I can offer you translation to Czech language.
    If you are interested in let me known on my email [hidden]

    Bye Jakub

  • http://shinephp.com Vladimir Garagulya

    Hi Jakub,
    I sent message to your email. Thanks in advance for your help.