>authorize is set to 'controller'.
This is my function (the comments explains everything):
function isAuthorized()
{
parent::isAuthorized();
//if the user is logged in. He cannot access the register and login
function
if( ($this->action == 'registreren') || ($this->action ==
'login') )
{
if( $this->Auth->user() )
{
return false;
}
else
{
return true;
}
}
//other actions are available for everyone
return true;
}
The problem is that it seems that this function is not called because
when I'm logged in, I still can access the registreren action.
Is there something I'm doing wrong. Or have I misunderstood the
meaning of this function?
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment