当前位置: 动力学知识库 > 问答 > 编程问答 >

php - IonAuth groups - not returning correct value

问题描述:

so I just started to use Ion_Auth lib for my CI applications and anyway I am having a bit of trouble with the results I get when using the library function in_group. Everything worked fine until I manually edited the default admin account and deleted it from the members group; yet if I do a check with in_group I am constantly getting returned that admin is a member of both groups.

So the following code returns both if statements as true, although admin is only in the admin user group...

if ($this->ion_auth->in_group('admin')) echo 1;

if ($this->ion_auth->in_group('members')) echo 2;

I've already tried logging out, clearing my cookies and cache but nothing seems to work.

网友答案:

Ok the problem is that IonAuth cached that info, so when editing the db directly you also have to make a corresponding call $this->ion_auth->remove_from_group(1,2)

分享给朋友:
您可能感兴趣的文章:
随机阅读: