summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index c9dcac3cbb9..803d3e8bde5 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -345,6 +345,10 @@ class OC{
self::initPaths();
+ register_shutdown_function(array('OC_Log', 'onShutdown'));
+ set_error_handler(array('OC_Log', 'onError'));
+ set_exception_handler(array('OC_Log', 'onException'));
+
// set debug mode if an xdebug session is active
if (!defined('DEBUG') || !DEBUG) {
if(isset($_COOKIE['XDEBUG_SESSION'])) {
@@ -517,20 +521,20 @@ class OC{
protected static function handleLogin() {
OC_App::loadApps(array('prelogin'));
- $error = false;
+ $error = array();
// remember was checked after last login
if (OC::tryRememberLogin()) {
- // nothing more to do
+ $error[] = 'invalidcookie';
// Someone wants to log in :
} elseif (OC::tryFormLogin()) {
- $error = true;
+ $error[] = 'invalidpassword';
// The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
} elseif (OC::tryBasicAuthLogin()) {
- $error = true;
+ $error[] = 'invalidpassword';
}
- OC_Util::displayLoginPage($error);
+ OC_Util::displayLoginPage(array_unique($error));
}
protected static function cleanupLoginTokens($user) {