User with full admin rights gives error

FreePBX14, Asterisk 14

When I create a user in User Management and choose Yes for Grand Full Admin Rights. WHen I login as that user I see the following error:

$fpbx_menu[$itemKey] = $item;

            // allow a module to replace our main index page

            if($display == '' && !empty($_SESSION['AMP_user'])){
                    Get default landing page from userman.
                    is_object($_SESSION["AMP_user"]) &&
                    method_exists($_SESSION["AMP_user"],'getMode') &&
                    $_SESSION["AMP_user"]->getMode() === 'usermanager' &&
                    FreePBX::Config()->get('AUTHTYPE') === 'usermanager' &&
                ) {
                    $um = \FreePBX::Userman();
                    $user_detail     = $um->getUserByUsername($_SESSION["AMP_user"]->username);
                    $landing_page     = $um->getCombinedGlobalSettingByID($user_detail['id'],'pbx_landing');
                    $modules_enabled = $um->getCombinedGlobalSettingByID($user_detail['id'],'pbx_modules');
                    $landing_page    = empty($landing_page) || !in_array($landing_page,$modules_enabled) ? "index" : $landing_page;
                } else {
                    $landing_page = 'index';

                $display        = $landing_page;
                $_REQUEST['display'] = $landing_page;

            // check current item
            if ($display == $item['display']) {
                // found current menuitem, make a reference to it
                $cur_menuitem =& $fpbx_menu[$itemKey];


//TODO remove this at a later date
if(is_object($_SESSION[“AMP_user”]) && !method_exists($_SESSION[“AMP_user”],‘getMode’)) {
“in_array() expects parameter 2 to be array, null given”

This is now fixed thank you for reporting the bug

1 Like

I updated to the edge version of framework and user management and the error is now gone. However for a user given Full Admin Rights, when they first log in there are no options besides the search bar (which does work) If you search for User management it will take you to the module and then the top menu bar will appear

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.