2011-07-12 21 views

回答

1

您需要將一個"userScope" property添加到您的身份驗證組件。我相信這應該適合你:

$this->Auth->userScope = array('User.accepted' => true); 

添加到您的應用程序控制器beforeFilter()

+0

謝謝!到目前爲止,這正是我正在尋找的。你知道是否可以查看不同於'$ this-> Auth-> loginError'的錯誤信息嗎? – Henri

+0

我在麪包店看到這篇文章:http://bakery.cakephp.org/articles/m3nt0r/2008/09/21/authed-adds-rule-based-userscope-to-auth – Dunhamzzz