WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Advanced Access Manager] checkAccess Error

[Plugin: Advanced Access Manager] checkAccess Error

  • Hi,

    I can’t seem to figure out why I am getting this error:

    Call to a member function checkAccess() on a non-object in [DIR]\advanced-access-manager\mvb_wp_access.php on line 945

    I’m looking at the code, but I’m really struggling to figure this out…

    Anything you can give me to help out would be a big help.

    v1.5.5 of the plugin just activated…

    –d

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Vasyltech

    @vasyl_m

    Hi whatadewitt,
    In mvb_wp_access.php file in __construct move the line
    $this->menu = new mvb_Model_FilterMenu($this);
    right under:
    //TODO – Optimize this

    So the code should looks like this:
    public function __construct() {
    global $post;

    //TODO – Optimize this
    $this->user = new mvb_Model_User();
    $this->menu = new mvb_Model_FilterMenu($this);

    I’ll fix this issue in release 1.5.6

    Thanks Vasyl!

    EDIT: This works!

    Plugin Author Vasyltech

    @vasyl_m

    whatadewitt,
    Actually this is much better:

    public function __construct() {
    global $post;

    //initialize AAM Settings
    $this->initUserAccessConfig();

    //TODO – Optimize this
    $this->user = new mvb_Model_User();
    $this->menu = new mvb_Model_FilterMenu($this);

    Because otherwise if user is not logged in it’ll cause fatal error.
    I almost finished next release. Just prefer to wait few more days for feedback.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Advanced Access Manager] checkAccess Error’ is closed to new replies.