We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51e57fe commit 18233e6Copy full SHA for 18233e6
src/lib/Mutation/AuthenticationMutation.php
@@ -38,10 +38,16 @@ public function createToken(Argument $args): array
38
39
try {
40
$user = $this->userService->loadUserByLogin($args['username']);
41
- $this->userService->checkUserCredentials($user, $args['password']);
42
} catch (NotFoundException) {
43
return [
44
- 'message' => 'Wrong username or password',
+ 'message' => 'Wrong username',
+ 'token' => null,
45
+ ];
46
+ }
47
+
48
+ if (!$this->userService->checkUserCredentials($user, $args['password'])) {
49
+ return [
50
+ 'message' => 'Wrong password',
51
'token' => null,
52
];
53
}
0 commit comments