Use User:: API insteadd of direct database read
authorDean Townsley <dean@townsley.com>
Sat, 22 Jun 2019 23:56:33 +0000 (18:56 -0500)
committerDean Townsley <dean@townsley.com>
Sat, 22 Jun 2019 23:56:33 +0000 (18:56 -0500)
src/Protocol/DFRN.php

index 0e2bfc5..e47cfc7 100644 (file)
@@ -2928,7 +2928,7 @@ class DFRN
                        $baseurl = substr($baseurl, $domain_st + 3);
                        $nurl = Strings::normaliseLink($baseurl);
 
-                       $r = DBA::selectFirst("user", ["uid"], ["nickname" => DBA::escape($contact_nick)], []);
+                       $r = User::getByNickname($contact_nick, ["uid"]);
                        $contact_uid = $r["uid"];
 
                        /// @todo Why is there a query for "url" *and* "nurl"? Especially this normalising is strange.