• Resolved Mcwolf

    (@mcwolf00)


    Hi Support,

    I upgraded UAM plugin from 1.2.14 to 2.0.7 and found an issue:
    I have a custom code in my theme, which is using:
    global $oUserAccessManager;

    $uamAccessHandler = $oUserAccessManager->getAccessHandler();

    But know I cannot get object $oUserAccessManager (even $UserAccessManager).

    Do you know how to get it in the new version of plugin? Thanks a lot.

    (I saw table structure is also changed in the new version, so i manually uninstall and install the plugin, then manually input my data.)

    Cheers
    Mcwolf

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

    (@gm_alex)

    Hey,

    it changed to global $userAccessManager;.

    Regards,
    Alex

    Thread Starter Mcwolf

    (@mcwolf00)

    Hi Alex,

    Awesome, when update the database table and replace the object name, it is working without any issue.

    Thanks a lot.

    Cheers,
    Mcwolf

    Thread Starter Mcwolf

    (@mcwolf00)

    Hi Alex,

    Sorry to bother u again.

    Just found another issue with new version:

    the old code is try to add an user in one group:

    global $userAccessManager;
    $uamAccessHandler = $userAccessManager->getAccessHandler();
    $uamUserGroup = $uamAccessHandler->getUserGroups("1");
    $uamUserGroup->addObject('user', $wp_uid); 
    $uamUserGroup->save();

    As upgrade to new version, i change:
    $uamUserGroup->addObject('user', $wp_uid);
    to
    $uamUserGroup->addObject('_user_', $wp_uid);

    But it still stops at this step.

    Can you help again? Thanks a lot.

    Cheers,
    Mcwolf

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Get null from global $oUserAccessManager’ is closed to new replies.