protected function findAccount() { $account = Account::findOne(Yii::$app->user->identity->getId()); if ($account === null) { throw new NotFoundHttpException('The requested page does not exist'); } return $account; }
protected function findAccount($id) { $id = Uuid::str2uuid($id); $account = Account::findOne($id); if ($account === null) { throw new NotFoundHttpException('The requested page does not exist'); } return $account; }