Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-06-09 17:25:00 +0400
committerRobin Appelman <icewind@owncloud.com>2012-06-09 17:28:57 +0400
commitec55eaef5bf5f198dd9fdc46d41fa9e62105f281 (patch)
treea6847c65cd861461000c89e4d98381e638768825 /index.php
parent43501309e336ac0268b6e9b4b3c6f5b0f05f7056 (diff)
dont load apps when displaying the login page
and only load authentication apps during login
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.php b/index.php
index d552c149df8..940bb797207 100755
--- a/index.php
+++ b/index.php
@@ -69,10 +69,10 @@ elseif(OC_User::isLoggedIn()) {
// For all others cases, we display the guest page :
} else {
- OC_App::loadApps();
$error = false;
// remember was checked after last login
if(isset($_COOKIE["oc_remember_login"]) && isset($_COOKIE["oc_token"]) && isset($_COOKIE["oc_username"]) && $_COOKIE["oc_remember_login"]) {
+ OC_App::loadApps(array('authentication'));
if(defined("DEBUG") && DEBUG) {
OC_Log::write('core','Trying to login from cookie',OC_Log::DEBUG);
}
@@ -88,6 +88,7 @@ elseif(OC_User::isLoggedIn()) {
// Someone wants to log in :
} elseif(isset($_POST["user"]) and isset($_POST['password']) and isset($_SESSION['sectoken']) and isset($_POST['sectoken']) and ($_SESSION['sectoken']==$_POST['sectoken']) ) {
+ OC_App::loadApps(array('authentication'));
if(OC_User::login($_POST["user"], $_POST["password"])) {
if(!empty($_POST["remember_login"])){
if(defined("DEBUG") && DEBUG) {
@@ -107,6 +108,7 @@ elseif(OC_User::isLoggedIn()) {
// The user is already authenticated using Apaches AuthType Basic... very usable in combination with LDAP
} elseif(isset($_SERVER["PHP_AUTH_USER"]) && isset($_SERVER["PHP_AUTH_PW"])){
+ OC_App::loadApps(array('authentication'));
if (OC_User::login($_SERVER["PHP_AUTH_USER"],$_SERVER["PHP_AUTH_PW"])) {
//OC_Log::write('core',"Logged in with HTTP Authentication",OC_Log::DEBUG);
OC_User::unsetMagicInCookie();