request->getPost(); $verifyValidator = new VerifyValidator(); $verifyValidator->checkEmailCode($post['email'], $post['verify_code']); $accountValidator = new AccountValidator(); $data = []; $data['email'] = $accountValidator->checkEmail($post['email']); $accountValidator->checkIfEmailTaken($post['email']); $data['password'] = $accountValidator->checkPassword($post['password']); $account = new AccountModel(); $account->create($data); $userRepo = new UserRepo(); return $userRepo->findById($account->id); } }