Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 cakephp 2 书中 -> 授权示例 -> (允许谁访问什么)。
实际链接
该函数isAuthorized($user)已声明但从未调用。它是如何工作的?
isAuthorized($user)
谢谢。
您还需要添加public $components
public $components
public $components = array( 'Auth' => array( 'authorize' => array('Controller') // Added this line ) );
并且isAuthorized()仅在用户登录后调用。
isAuthorized()