Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5a0977df authored by Akhil's avatar Akhil
Browse files

Handle exception in method call to check username

parent 262caf41
Loading
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -195,11 +195,16 @@ class AccountController extends Controller {
			return $response;
		}

		try {
			if (!$this->userService->userExists($username) && !$this->userService->isUsernameTaken($username)) {
				$response->setStatus(200);
				$this->session->set('username_check_passed', true);
			}
		} catch (Exception $e) {
			$this->logger->logException($e, ['app' => Application::APP_ID ]);
			$response->setStatus(500);
		}

		$this->session->set('username_check_passed', true);
		return $response;
	}