protected function _initialize(){
parent::_initialize(); //Modify here
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 access rights',url('user/login'));
}
}
protected function alreadyLogin()
{
if(empty(USER_ID)){
$this->error('The user has already logged in, please do not log in again', url('index/index'));
}
}
index.html:1 Error in event handler for (unknown): TypeError: Cannot read property ' parentNode' of undefined this error message appears, thank you for your help
empty is replaced with defined