|
|
|
|
|
|
|
|
// Someone is logged in : |
|
|
// Someone is logged in : |
|
|
elseif(OC_User::isLoggedIn()) { |
|
|
elseif(OC_User::isLoggedIn()) { |
|
|
if(isset($_GET["logout"]) and ($_GET["logout"])) { |
|
|
if(isset($_GET["logout"]) and ($_GET["logout"])) { |
|
|
|
|
|
OC_App::loadApps(); |
|
|
OC_User::logout(); |
|
|
OC_User::logout(); |
|
|
header("Location: ".OC::$WEBROOT.'/'); |
|
|
header("Location: ".OC::$WEBROOT.'/'); |
|
|
exit(); |
|
|
exit(); |
|
|
|
|
|
|
|
|
OC_User::unsetMagicInCookie(); |
|
|
OC_User::unsetMagicInCookie(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Someone wants to log in : |
|
|
// Someone wants to log in : |
|
|
elseif(isset($_POST["user"]) && isset($_POST['password'])) { |
|
|
elseif(isset($_POST["user"]) && isset($_POST['password'])) { |
|
|
if(OC_User::login($_POST["user"], $_POST["password"])) { |
|
|
if(OC_User::login($_POST["user"], $_POST["password"])) { |