cakephp - How to allow action using security component? -


i getting error

call undefined method securitycomponent::allowedactions()     

when try allow singup action in controller this

public function beforefilter() {             parent::beforefilter();             $this->security->allowedactions(array('sign-up'));             $this->auth->allow('login','signup','index','activate','logout','forgot','reset','display');             if($this->auth->user('id')) {                 $this->set('logged_in', true);             } else {                 $this->set('logged_in', false);             }         }          public $components = array('requesthandler'); 

if remove

$this->security->allowedactions(array('sign-up')); 

when submit signup form, shows request has ben blackholed

there no such method, allowedactions property of securitycomponent.

http://book.cakephp.org/2.0/en/core-libraries/components/security-component.html#securitycomponent::$allowedactions

$this->security->allowedactions = array('sign-up'); 

also using signup in authcomponent::allow(), make sure sign-up correct name of action (which doubt invalid php syntax).


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -