Allow access an action without authonticate in cakephp

Cakephp

Posted on 17 Nov 15 by Vickey
  409



In cakephp if we are using Auth component then we can not access any action without authonticate but if we need we can allow access any action by using 'allow' method. For example if i am not logedin and i want login then i need to access my login function but because of Auth componenet i can not access this then i can use the below code in my controller

public function beforeFilter() 
{
	parent::beforeFilter();
	$this->Auth->allow('login');
}

 


If this post help you reduce time to develop, you can help me to maintain this website :)
www.000webhost.com