Code:
Could not find phrase 'no_permission'. Arguments given were: on /usr/share/nginx/html/main/public/forums/core/vb/api/template.php : 556
I have checked the config file to ensure that $config['SpecialUsers']['superadmins'] is correct.
I added some debugging to the createAdminSession function in class_upgrade.php.
Code:
public static function createAdminSession()
{
$session = vB::getCurrentSession();
if(empty($session) OR ($session->get('userid') {
echo "GOT HERE \n";
echo empty($session) ? "NO SESSION \n" : "GOT A SESSION \n";
$userid = vB_PermissionContext::getAdminUser();
echo "NEW USER ID: " . print_r($userid);
$session = new vB_Session_Cli(vB::getDbAssertor(), vB::getDatastore(), vB::getConfig(), $userid);
$session->fetchCpsessionHash();
vB::setCurrentSession($session);
}
}
It is showing correctly that the new user id is 1, however inside the api/template.php checkCanSaveTemplate function, the userContext is coming back with a userid of 0, causing the permission errors.
Any help with this would be appreciated.
-Thanks
Devami...