public static function isGuest() { if (!self::$_usr) { self::$_usr = FrontuserHelper::getLoginUser(); } if (self::$_usr) { return false; } else { return true; } }
/** * Logs out the current user and redirect to homepage. */ public function actionLogout() { FrontuserHelper::logout(); $this->redirect(Yii::app()->homeUrl); }
public function login() { return FrontuserHelper::login($this->username, $this->password); }