getStorage()->read(); if (!is_null($userInfo->id)) { $this->currentUser = CcSubjsQuery::create()->findPK($userInfo->id); } } /** * Returns a CcSubjs object. */ public function getCurrentUser() { if (is_null($this->currentUser)) { throw new Exception(); } return $this->currentUser; } }