load apps before logout so that logout-hook works

This commit is contained in:
Arthur Schiwon 2012-02-20 11:21:46 +01:00
parent 7ff4e40b20
commit 30d524b426
1 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ if($_SERVER['REQUEST_METHOD']=='PROPFIND'){
// Someone is logged in :
elseif(OC_User::isLoggedIn()) {
if(isset($_GET["logout"]) and ($_GET["logout"])) {
OC_App::loadApps();
OC_User::logout();
header("Location: ".OC::$WEBROOT.'/');
exit();
@ -80,7 +81,7 @@ else {
OC_User::unsetMagicInCookie();
}
}
// Someone wants to log in :
elseif(isset($_POST["user"]) && isset($_POST['password'])) {
if(OC_User::login($_POST["user"], $_POST["password"])) {