protected function _initialize()
{
parent::initialize();
define('USER_ID',Session::get('user_id'));
}
protected function isLogin()
{
if (empty(USER_ID)){
$this -> error ('The user is not logged in and has no permission to access',url('user/login') ; Log in, please do not log in again',url('index/index'));
Don't cry2018-02-27 18:05:40
Don’t give protected attributes to your magic functions, give them public