Reputation: 460
Is there any way to include a field to be checked in CakePHP's Auth?
e.g.: if status_id == 1
Upvotes: 0
Views: 34
Reputation: 4526
You need to add status_id =1 on auth components setting.. Like
public $components = array(
'Session',
'Auth' => array(
'loginRedirect' => array('controller' => 'posts', 'action' => 'index'),
'logoutRedirect' => array('controller' => 'pages', 'action' => 'display', 'home'),
'authorize' => array('Controller'),
'authenticate' => array(
'Form' => array(
'scope' => array(
'status_id' => 1
)
)
)
)
);
Upvotes: 1