diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-12 22:10:42 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-12 22:10:42 -0700 |
commit | 29a29f277e4280efe88e70b66e42ff97ca967db9 (patch) | |
tree | 5b2d7dfaa6cd1186ccc1b9f35ea08ae4feabea71 /include | |
parent | e5f1bcacc857561fb6edc580c2d9657a81fa0867 (diff) | |
download | volse-hubzilla-29a29f277e4280efe88e70b66e42ff97ca967db9.tar.gz volse-hubzilla-29a29f277e4280efe88e70b66e42ff97ca967db9.tar.bz2 volse-hubzilla-29a29f277e4280efe88e70b66e42ff97ca967db9.zip |
create an actual logout module instead of relying on internal variables
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/channel.php b/include/channel.php index 488bdeef0..d7116ce28 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2308,7 +2308,7 @@ function profile_store_lowlevel($arr) { // It is the caller's responsibility to confirm the requestor's intent and // 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); @@ -2353,13 +2353,12 @@ function account_remove($account_id,$local = true,$unset_session=true) { if ($unset_session) { - unset($_SESSION['authenticated']); - unset($_SESSION['uid']); - notice( sprintf(t("User '%s' deleted"),$account_email) . EOL); + App::$session->nuke(); + notice( sprintf(t('Account \'%s\' deleted'),$account_email) . EOL); goaway(z_root()); } - return $r; + return $r; } /** |