mirror of
https://github.com/filegator/filegator.git
synced 2025-08-05 06:48:00 +02:00
phpstan & refactoring
This commit is contained in:
@@ -67,6 +67,10 @@ class AuthController
|
||||
return $response->json($errors->firstOfAll(), 422);
|
||||
}
|
||||
|
||||
if ($auth->user() === null) {
|
||||
return $response->json(['oldpassword' => 'Wrong password'], 422);
|
||||
}
|
||||
|
||||
if (! $auth->authenticate($auth->user()->getUsername(), $request->input('oldpassword'))) {
|
||||
return $response->json(['oldpassword' => 'Wrong password'], 422);
|
||||
}
|
||||
|
Reference in New Issue
Block a user