• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

beta8 admin issues

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby stinus » Tue Feb 06, 2007 10:32 am

beta8 works fine but I'm having some strange problems with admin functionality
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
stinus
New member
 
Posts: 2
Joined: Tue Jan 30, 2007 12:00 pm
Top

Postby stinus » Tue Feb 06, 2007 12:37 pm

ok, I somehow got this working, I rewrote some code and it's working fine now.
If I knew what fixed it, I'd post the solution.
Might just have been caching issues though.
stinus
New member
 
Posts: 2
Joined: Tue Jan 30, 2007 12:00 pm
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 17 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub