Support » Plugin: User Role Editor » [Plugin: User Role Editor] s2Member / Per-User Capabilities

  • Resolved PriMoThemes

    (@primothemes)


    Hi there. Thanks for a great plugin!

    I’m the author of the s2Member plugin, and we are planning to refer some of our clients to your plugin.

    However, I was hoping you might be able to provide the ability to edit Capabilities on a per-User basis? This is possible internally, but I’ve not seen a plugin that makes it easily editable. Perhaps a tool in the User Editing Panel for WordPress?

    If you can add this feature, please let me know. I’ll be willing to make a donation toward it’s development.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Vladimir Garagulia

    (@shinephp)

    Hello,
    thanks.

    If I’m not wrong, WP has not built-in capability storage on per user basis. It stores role name assosiated with user in user_meta table meta_key ‘wp_capabilities’. It is possible to store individual user capabilities somewhere and apply them to the user’s capabilities context of course.
    But the same result could be achieved with the current realization if you create separate role for every user – use user name for role name, for example. Why not to go this way?

    Thanks for the reply.

    It can be accomplished in WordPress® like this.

    <?php
    $user_id = "123";
    /* ^The User's ID. */
    $user = new WP_User($user_id);
    $user->add_cap("new_capability");
    ?>

    These examples may also help you.

    <?php
    $user->remove_cap("old_capability");
    print_r($user->allcaps); /* All Capabilities array. */
    ?>

    Plugin Author Vladimir Garagulia

    (@shinephp)

    Thanks for the good idea. I went through ‘capabilities.php’ and saw that it could store in the ‘wp_usermeta’ table not only role names but capabilities too. It will be good addition to the URE plugin functionality. I will try to realize that to the end of April.

    Awesome.
    Where should I send my donation?
    Thank you!

    Plugin Author Vladimir Garagulia

    (@shinephp)

    Please refer this page http://www.shinephp.com/donate/ and select a way to make a donation for URE plugin development.

    Donation made. Hope it helps!
    ~ Thank you very much.

    Plugin Author Vladimir Garagulia

    (@shinephp)

    I see your payment. Thanks. Work on the discussed update is started.

    Plugin Author Vladimir Garagulia

    (@shinephp)

    I’m sorry for possible delay with delivering discussed update. I had short vacation at the end of April. I will build it these days.

    Plugin Author Vladimir Garagulia

    (@shinephp)

    Hello,

    Interface to edit user’s capabilities is ready for tests. You can download User Role Editor 3.1a from this link
    http://www.shinephp.com/wp-content/downloads/wordpress/plugins/user-role-editor-3.1a.zip
    Open users list. When you point mouse on the user name you will see the new link ‘Capabilities’. Click on it to edit capabilities of selected user. You can change role assigned to the user there. Capabilities included to the role assigned to user are shown as disabled. Rest capabilities could be added directly to this user.
    Please take a look and let me know about your test results.

    Regards,
    Vladimir.

    Oh, that’s awesome!
    Thank you SO much. We’re about to release the next version of s2Member, and I’ll be sure to test this out soon thereafter and report back to you. Until then, thanks again!

    hello,
    in my site drop down of user role shows one blank entry.
    I want to remove that So How can i remove that.

    Plugin Author Vladimir Garagulia

    (@shinephp)

    Hello,
    Could you show screenshot with that dropdown list opened?

    Thanks for the reply Vladimir Garagulya. It was due to plugin error. I removed the user role from database directly.

    Plugin Author Vladimir Garagulia

    (@shinephp)

    If it is User Role Editor plugin error, can you reproduce it? It’s useful to catch it in order to make the fix.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: User Role Editor] s2Member / Per-User Capabilities’ is closed to new replies.