hi,
I am beginner in cakephp.
I made controller and i want to apply "Beforefilter()" ,
which checks every time when controller/action calls.
i write beforefilter() in my controller and checking if session is exist and
username is set or not.
function beforefilter()
{
$username = $this->Session->read('UserProfile');
if (!$username){
$this->redirect(array('controller'=>'admin','action'=>'index'));
}
}
but every time code run and gives "REDIRECT LOOP" and hang.
--
View this message in context:
http://old.nabble.com/BeforeFilter-Redirect-Loop-tp27189033p27189033.html
Sent from the CakePHP mailing list archive at Nabble.com.
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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en