From 6ff6ac47431e3026d9c7704a1734fa62953688c6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 8 Mar 2011 00:39:42 -0800 Subject: profile deletion issues --- mod/profiles.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mod/profiles.php b/mod/profiles.php index 9e19caa0b..409999a3e 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -226,7 +226,7 @@ function profiles_content(&$a) { } if(($a->argc > 2) && ($a->argv[1] === "drop") && intval($a->argv[2])) { - $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d AND `is-default` = 0 AND `self` = 0 LIMIT 1", + $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d AND `is-default` = 0 LIMIT 1", intval($a->argv[2]), intval(local_user()) ); @@ -243,8 +243,9 @@ function profiles_content(&$a) { intval($a->argv[2]), intval(local_user()) ); - $r = q("DELETE FROM `profile` WHERE `id` = %d LIMIT 1", - intval($a->argv[2]) + $r = q("DELETE FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($a->argv[2]), + intval(local_user()) ); if($r) notice( t('Profile deleted.') . EOL); -- cgit v1.2.3