mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
fix the login form
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
c1595afe2d
commit
9954641e02
3 changed files with 12 additions and 13 deletions
|
|
@ -21,15 +21,17 @@ class LoginController
|
|||
|
||||
public function TryLogin(Request $request, Response $response, array $args) : Response {
|
||||
if (!$this->dockerActionManager->isLoginAllowed()) {
|
||||
return $response->withHeader('Location', '/')->withStatus(302);
|
||||
$response->getBody()->write("The login is blocked since Nextcloud is running.");
|
||||
return $response->withHeader('Location', '/')->withStatus(422);
|
||||
}
|
||||
$password = $request->getParsedBody()['password'] ?? '';
|
||||
if($this->authManager->CheckCredentials($password)) {
|
||||
$this->authManager->SetAuthState(true);
|
||||
return $response->withHeader('Location', '/')->withStatus(302);
|
||||
return $response->withHeader('Location', '/')->withStatus(201);
|
||||
}
|
||||
|
||||
return $response->withHeader('Location', '/')->withStatus(302);
|
||||
$response->getBody()->write("The password is false.");
|
||||
return $response->withHeader('Location', '/')->withStatus(422);
|
||||
}
|
||||
|
||||
public function GetTryLogin(Request $request, Response $response, array $args) : Response {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue