WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Access Manager
[resolved] Can not assign roles to new users (16 posts)

  1. JamieJackson
    Member
    Posted 2 years ago #

    Just activated the plugin and went to add a new user but can only assign a subscriber role? After creating the user as a subscriber with hopes of editing their role to Editor I get this message in the drop down - no role for this site - instead of the other roles.

    What am doing wrong?

    http://wordpress.org/extend/plugins/advanced-access-manager/

  2. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Jamie Jackson,
    What WP version you are using now?

    Regards,
    Vasyl

  3. googlesiterank
    Member
    Posted 2 years ago #

    i also facing same problem.

    i'm using WordPress 3.3
    please guide me what i do?

  4. JamieJackson
    Member
    Posted 2 years ago #

    Hi Vasyl,

    Thanks for helping! I'm using 3.3

  5. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    I'm guessing something has been changed with user level on release 3.3 and now filtering is not working properly.
    New release and a lot of surprises.
    I'll check it ASAP.

  6. JamieJackson
    Member
    Posted 2 years ago #

    thanks - I'll hold off on other wp upgrades.

  7. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Jamie,
    I have just release 1.4.3 with some emergency solutions. Hope this will help you in your case.

    Regards,
    Vasyl

  8. JamieJackson
    Member
    Posted 2 years ago #

    Hi Vasyl,

    Works perfectly! Thanks for the speedy update.

    Jamie

  9. Brian Cruikshank
    Member
    Posted 2 years ago #

    Hey, I have the exact same problem and it's still broken for me.

    WordPress 3.2.1
    Advanced Access Manager 1.4.3

    Brian

  10. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Brian,
    I didn't receive any emails with the same problem for WP 3.2.1.
    Please be sure that you have the highest user level to be able to do promote other users.

    Regards,
    Vasyl

  11. bjeremymoss
    Member
    Posted 2 years ago #

    Like Brian I am now having issues setting users to anything but subscriber with WordPress 3.2.1 and Access Manager 1.4.3

  12. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Ok. In such way I'll check this issue today for sure and let you know how to fix this.

  13. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    Hi guys,
    The problem is solved. The cause is ridiculous. In release WP 3.2.1 the list of user roles is associated array and in WP 3.3 is just an array. Why they did this change? Gifts and gifts for Christmas from core team :)
    Ok this is the solution. Go to advanced-access-manager/module/class-module_user.php and replace the function getCurrentUserRole with next script:
    function getCurrentUserRole() {
    global $wp_version;

    if (version_compare($wp_version, '3.3', '=')) {
    $result = (is_array($this->roles) ? $this->roles : array());
    } else {
    //deprecated, will be deleted in release 1.5
    if (is_object($this->data) && isset($this->data->{$this->cap_key})) {
    $result = array_keys($this->data->{$this->cap_key});
    } else {
    $result = array();
    }
    }

    return $result;
    }

    Regards,
    Vasyl

  14. bjeremymoss
    Member
    Posted 2 years ago #

    Works great thanks Vasyl!!!

  15. WP AAM
    Member
    Plugin Author

    Posted 2 years ago #

    If you experiencing the same problem with 3.3.1 you can download next file and replace it in advanced-access-manager/module.
    I'm going to release version 1.5.5 on Sunday this week so it'll have this fix.

    File can be downloaded here (please do not forget to rename it to php):
    http://whimba.org/temp/class-module_user.php1

    Apologize for small inconveniences.

  16. miaho
    Member
    Posted 2 years ago #

    Thanks Vasyl, panic over :) everything working again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic