Have you figured out how to get it to work? I am doing essentially the same
thing and my error is identical to yours. I am looking at the group_id the
user belongs to and then redirect based on which id.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their
Hi all,
I have a simple app that needs to have 2 types of users, normal users
and admins. I have got the Auth component working great and has the
entire site requiring log in etc, but I want to redirect users that
are admins to the admin route sections upon login.
I have this in my
Well quite normal since as long as you are not logged in beforeFilter
has no much effect on redirection ..
Better, use $this-Auth-autoRedirect = false; in beforeFilter ..
In login,
if($this-Auth-user('id'))
{
if($this-Auth-user('admin') == 'n')
blah;
else
otherblah ...
}