Skip to content
Snippets Groups Projects
Commit f04797bd authored by Olav Morken's avatar Olav Morken
Browse files

UserPass[Org]Base: Show all error codes to the user.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1589 44740490-163a-0410-bde0-09ae8108e29a
parent 52e9cd37
No related branches found
No related tags found
No related merge requests found
......@@ -139,18 +139,7 @@ abstract class sspmod_core_Auth_UserPassBase extends SimpleSAML_Auth_Source {
/* Attempt to log in. */
$attributes = $source->login($username, $password);
} catch (SimpleSAML_Error_Error $e) {
/* An error occured during login. Check if it is because of the wrong
* username/password - if it is, we pass that error up to the login form,
* if not, we let the generic error handler deal with it.
*/
if ($e->getErrorCode() === 'WRONGUSERPASS') {
return 'WRONGUSERPASS';
}
/* Some other error occured. Rethrow exception and let the generic error
* handler deal with it.
*/
throw $e;
return $e->getErrorCode();
}
$state['Attributes'] = $attributes;
......
......@@ -191,18 +191,7 @@ abstract class sspmod_core_Auth_UserPassOrgBase extends SimpleSAML_Auth_Source {
/* Attempt to log in. */
$attributes = $source->login($username, $password, $organization);
} catch (SimpleSAML_Error_Error $e) {
/* An error occured during login. Check if it is because of the wrong
* username/password - if it is, we pass that error up to the login form,
* if not, we let the generic error handler deal with it.
*/
if ($e->getErrorCode() === 'WRONGUSERPASS') {
return 'WRONGUSERPASS';
}
/* Some other error occured. Rethrow exception and let the generic error
* handler deal with it.
*/
throw $e;
return $e->getErrorCode();
}
$state['Attributes'] = $attributes;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment