profile deletion issues

This commit is contained in:
Friendika 2011-03-08 00:39:42 -08:00
parent 989b1b209e
commit 6ff6ac4743

View file

@ -226,7 +226,7 @@ function profiles_content(&$a) {
} }
if(($a->argc > 2) && ($a->argv[1] === "drop") && intval($a->argv[2])) { 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($a->argv[2]),
intval(local_user()) intval(local_user())
); );
@ -243,8 +243,9 @@ function profiles_content(&$a) {
intval($a->argv[2]), intval($a->argv[2]),
intval(local_user()) intval(local_user())
); );
$r = q("DELETE FROM `profile` WHERE `id` = %d LIMIT 1", $r = q("DELETE FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($a->argv[2]) intval($a->argv[2]),
intval(local_user())
); );
if($r) if($r)
notice( t('Profile deleted.') . EOL); notice( t('Profile deleted.') . EOL);