aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-08 00:39:42 -0800
committerFriendika <info@friendika.com>2011-03-08 00:39:42 -0800
commit6ff6ac47431e3026d9c7704a1734fa62953688c6 (patch)
treeb7bc382bdab7628dad22ce903c587edf9ce39e99 /mod
parent989b1b209e838232082f83841fb8f0324ebbae97 (diff)
downloadvolse-hubzilla-6ff6ac47431e3026d9c7704a1734fa62953688c6.tar.gz
volse-hubzilla-6ff6ac47431e3026d9c7704a1734fa62953688c6.tar.bz2
volse-hubzilla-6ff6ac47431e3026d9c7704a1734fa62953688c6.zip
profile deletion issues
Diffstat (limited to 'mod')
-rw-r--r--mod/profiles.php7
1 files 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);