summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php25
1 files changed, 15 insertions, 10 deletions
diff --git a/lib/base.php b/lib/base.php
index dbfe0eb2f27..558be6b570f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -846,19 +846,24 @@ class OC {
protected static function handleLogin() {
OC_App::loadApps(array('prelogin'));
$error = array();
+ $messages = [];
- // auth possible via apache module?
- if (OC::tryApacheAuth()) {
- $error[] = 'apacheauthfailed';
- } // remember was checked after last login
- elseif (OC::tryRememberLogin()) {
- $error[] = 'invalidcookie';
- } // logon via web form
- elseif (OC::tryFormLogin()) {
- $error[] = 'invalidpassword';
+ try {
+ // auth possible via apache module?
+ if (OC::tryApacheAuth()) {
+ $error[] = 'apacheauthfailed';
+ } // remember was checked after last login
+ elseif (OC::tryRememberLogin()) {
+ $error[] = 'invalidcookie';
+ } // logon via web form
+ elseif (OC::tryFormLogin()) {
+ $error[] = 'invalidpassword';
+ }
+ } catch (\OC\User\LoginException $e) {
+ $messages[] = $e->getMessage();
}
- OC_Util::displayLoginPage(array_unique($error));
+ OC_Util::displayLoginPage(array_unique($error), $messages);
}
/**