- } elseif($cmd === 'removeme') {
- $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($item_id));
- if (! $r)
+ } elseif ($cmd === 'removeme') {
+ $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
+ `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
+ `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid`
+ FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
+ WHERE `contact`.`uid` = %d AND `contact`.`self` LIMIT 1",
+ intval($item_id));
+ if (!$r)