aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-11 17:40:04 -0700
committerzotlabs <mike@macgirvin.com>2018-04-11 17:40:04 -0700
commit2fa9645dfc4dc640d7460f069fc9536cce1e4fd2 (patch)
tree5a39b89802c92f32af7795050aaa3e11f9db21e6 /include/auth.php
parent90580a860b45629f510c0cf6871fe312a9693a77 (diff)
downloadvolse-hubzilla-2fa9645dfc4dc640d7460f069fc9536cce1e4fd2.tar.gz
volse-hubzilla-2fa9645dfc4dc640d7460f069fc9536cce1e4fd2.tar.bz2
volse-hubzilla-2fa9645dfc4dc640d7460f069fc9536cce1e4fd2.zip
channel delegation: push current identity and pop it on logout from the delegated channel. This fixes the known issue of being forced to log back in after leaving the delegated channel.
Diffstat (limited to 'include/auth.php')
-rw-r--r--include/auth.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/auth.php b/include/auth.php
index 844566919..c44eeb8fc 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -145,8 +145,17 @@ if((isset($_SESSION)) && (x($_SESSION, 'authenticated')) &&
// process logout request
$args = array('channel_id' => local_channel());
call_hooks('logging_out', $args);
- App::$session->nuke();
- info( t('Logged out.') . EOL);
+
+
+ if($_SESSION['delegate'] && $_SESSION['delegate_push']) {
+ $_SESSION = $_SESSION['delegate_push'];
+ info( t('Delegation session ended.') . EOL);
+ }
+ else {
+ App::$session->nuke();
+ info( t('Logged out.') . EOL);
+ }
+
goaway(z_root());
}