diff options
author | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
---|---|---|
committer | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
commit | 25c674b73a5ec39a9826906aed3e35e77d72e392 (patch) | |
tree | dc17e0d8f5dc899ccfa9e0239fe7623c43a95d49 /mod/profiles.php | |
parent | 07ebc15612807512422ba84060914c5c4c853102 (diff) | |
parent | c248b28f922603ec135fea903a9ec3f0ef63c935 (diff) | |
download | volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.gz volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.bz2 volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.zip |
Merge remote branch 'mike/master'
Diffstat (limited to 'mod/profiles.php')
-rw-r--r-- | mod/profiles.php | 7 |
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); |