public static function me() { if (!self::$me) { $user_login = self::getUserIfLogin(); if (empty($user_login)) { throw new Exception("not signin", ERR_USER_NOT_SIGNIN); } self::$me = new MUser($user_login['uid'], $user_login); } return self::$me; }
public final function execute() { $this->init(); try { $me = MUser::me(); } catch (Exception $e) { $me = null; } $this->me = $me; $this->pageExecute(); $this->assign('me', $this->me); $this->assign('title', $this->title); $this->assign('page', $this->page); $this->displayTemplate('framework.tpl.php'); }
public final function execute() { $this->init(); try { $me = MUser::me(); } catch (Exception $e) { switch ($e->getCode()) { case ERR_USER_NOT_SIGNIN: $this->userNotSignin(); break; default: $this->checkSigninFail($e); break; } return; } $this->signinExecute($me); }