Skip to content

Commit f60c70f

Browse files
authored
Merge pull request drupalauth#66 from dkosbob/master
Fix error codes
2 parents 3a98fd4 + f9e2d93 commit f60c70f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/Auth/Source/External.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private function getUser()
155155
// Load the user object from Drupal.
156156
$drupaluser = User::load($uid);
157157
if ($drupaluser->isBlocked()) {
158-
throw new Error('USER_BLOCKED');
158+
throw new Error('NOACCESS');
159159
}
160160

161161
$requested_attributes = $this->config->getAttributes();

lib/Auth/Source/UserPass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ protected function login($username, $password)
115115
// Authenticate the user.
116116
$uid = $userAuth->authenticate($username, $password);
117117
if ($uid === false) {
118-
throw new Error('WRONG_USER_PASS');
118+
throw new Error('WRONGUSERPASS');
119119
}
120120

121121
// Load the user object from Drupal.
122122
$drupaluser = User::load($uid);
123123
if ($drupaluser->isBlocked()) {
124-
throw new Error('USER_BLOCKED');
124+
throw new Error('NOACCESS');
125125
}
126126

127127
$requested_attributes = $this->config->getAttributes();

0 commit comments

Comments
 (0)