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:

/var/www/html/admin/config.php
$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.
                */
                if(
                    is_object($_SESSION["AMP_user"]) &&
                    method_exists($_SESSION["AMP_user"],'getMode') &&
                    $_SESSION["AMP_user"]->getMode() === 'usermanager' &&
                    FreePBX::Config()->get('AUTHTYPE') === 'usermanager' &&
                    FreePBX::Modules()->checkStatus('userman')
                ) {
                    $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ā€™)) {
Arguments
ā€œ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.