Question

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.

Was it helpful?

Solution

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top