- /*
- * be careful - $importer will contain both the contact information for the contact
- * sending us the post, and also the user information for the person receiving it.
- * since they are mixed together, it is easy to get them confused.
- */
-
- $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`,
- `contact`.`pubkey` AS `cpubkey`,
- `contact`.`prvkey` AS `cprvkey`,
- `contact`.`thumb` AS `thumb`,
- `contact`.`url` as `url`,
- `contact`.`name` as `senderName`,
- `user`.*
- FROM `contact`
- LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
- WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- AND `user`.`nickname` = '%s' AND `user`.`account_expired` = 0 AND `user`.`account_removed` = 0 $sql_extra LIMIT 1",
- DBA::escape($a->argv[1])
- );
-
- if (!DBA::isResult($r)) {
- logger('contact not found for dfrn_id ' . $dfrn_id);
+ $contact = DBA::selectFirst('contact', ['id'], $condition);
+ if (!DBA::isResult($contact)) {
+ Logger::log('contact not found for dfrn_id ' . $dfrn_id);