From a4cbdc241423ca84eff2e888cf5c0a2cecea5f2a Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 3 Feb 2011 03:58:47 -0800 Subject: remove self --- include/Contact.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/Contact.php') diff --git a/include/Contact.php b/include/Contact.php index 98d3e7c0b..7cac3c0e0 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -6,6 +6,10 @@ // authorisation to do this. function user_remove($uid) { + if(! $uid) + return; + $a = get_app(); + logger('Removing user: ' . $uid); q("DELETE FROM `contact` WHERE `uid` = %d", intval($uid)); q("DELETE FROM `group` WHERE `uid` = %d", intval($uid)); q("DELETE FROM `group_member` WHERE `uid` = %d", intval($uid)); @@ -19,7 +23,7 @@ function user_remove($uid) { if($uid == local_user()) { unset($_SESSION['authenticated']); unset($_SESSION['uid']); - killme(); + goaway($a->get_baseurl()); } } -- cgit v1.2.3