Commit 29a29f27 authored by Zot's avatar Zot
Browse files

create an actual logout module instead of relying on internal variables

parent e5f1bcac
<?php
namespace Zotlabs\Module;
class Logout extends \Zotlabs\Web\Controller {
function init() {
\App::$session->nuke();
goaway(z_root());
}
}
\ No newline at end of file
...@@ -2308,7 +2308,7 @@ function profile_store_lowlevel($arr) { ...@@ -2308,7 +2308,7 @@ function profile_store_lowlevel($arr) {
// It is the caller's responsibility to confirm the requestor's intent and // It is the caller's responsibility to confirm the requestor's intent and
// authorisation to do this. // authorisation to do this.
function account_remove($account_id,$local = true,$unset_session=true) { function account_remove($account_id,$local = true,$unset_session = true) {
logger('account_remove: ' . $account_id); logger('account_remove: ' . $account_id);
...@@ -2353,13 +2353,12 @@ function account_remove($account_id,$local = true,$unset_session=true) { ...@@ -2353,13 +2353,12 @@ function account_remove($account_id,$local = true,$unset_session=true) {
if ($unset_session) { if ($unset_session) {
unset($_SESSION['authenticated']); App::$session->nuke();
unset($_SESSION['uid']); notice( sprintf(t('Account \'%s\' deleted'),$account_email) . EOL);
notice( sprintf(t("User '%s' deleted"),$account_email) . EOL);
goaway(z_root()); goaway(z_root());
} }
return $r;
return $r;
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment