aboutsummaryrefslogtreecommitdiffstats
path: root/include/Contact.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-14 17:25:45 -0700
committerfriendica <info@friendica.com>2014-08-14 17:25:45 -0700
commit1d4fde71e0f7439804f312be54df80d230e454d5 (patch)
tree203bb5c23f86d47c8ca84d8fb08f142788d6f653 /include/Contact.php
parent9d2335ebc8d96659133385b45c89c3b6b24611f2 (diff)
parentf4229dbc3f17463d41a39e6b9038dd10fee6597a (diff)
downloadvolse-hubzilla-1d4fde71e0f7439804f312be54df80d230e454d5.tar.gz
volse-hubzilla-1d4fde71e0f7439804f312be54df80d230e454d5.tar.bz2
volse-hubzilla-1d4fde71e0f7439804f312be54df80d230e454d5.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'include/Contact.php')
-rw-r--r--include/Contact.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 100854f0d..47b1763cb 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -162,7 +162,7 @@ function user_remove($uid) {
}
-function account_remove($account_id,$local = true) {
+function account_remove($account_id,$local = true,$unset_session=true) {
logger('account_remove: ' . $account_id);
@@ -196,7 +196,7 @@ function account_remove($account_id,$local = true) {
);
if($x) {
foreach($x as $xx) {
- channel_remove($xx['channel_id'],$local);
+ channel_remove($xx['channel_id'],$local,false);
}
}
@@ -204,11 +204,16 @@ function account_remove($account_id,$local = true) {
intval($account_id)
);
+ if ($unset_session) {
+ unset($_SESSION['authenticated']);
+ unset($_SESSION['uid']);
+ goaway(get_app()->get_baseurl());
+ }
return $r;
}
-function channel_remove($channel_id, $local = true) {
+function channel_remove($channel_id, $local = true, $unset_session=true) {
if(! $channel_id)
return;
@@ -292,7 +297,7 @@ function channel_remove($channel_id, $local = true) {
proc_run('php','include/directory.php',$channel_id);
- if($channel_id == local_user()) {
+ if($channel_id == local_user() && $unset_session) {
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);
goaway($a->get_baseurl());