I have a login page which checks if the user logging in is an admin. If he is I do the following:
- Code: Select all
if($admin)
{
$params["isadmin"] = true;
}
Now this should work without any problems. Only in my case the flag is set to true but the user will never be able to use admin commands.
After some searching, I tried setting the adminflag via metadata:
- Code: Select all
require_once "src/pfcinfo.class.php";
$info = new pfcInfo($serverid);
$container =& $info->getContainerInstance();
$nickid = $container->getNickId($nick);
$container->setUserMeta($nickid, 'isadmin', true);
This will set the isadmin metadata to 'isadmin' on login. If the user refreshes the page it changes to 1 and the user is an actual admin.
What am I overlooking? I'm sure there's a simple explanation why it doesn't work but I'm lost