]> git.mxchange.org Git - friendica.git/commitdiff
Fix for PR 4095
authorMichael <heluecht@pirati.ca>
Mon, 18 Dec 2017 09:21:47 +0000 (09:21 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 18 Dec 2017 09:21:47 +0000 (09:21 +0000)
src/Model/User.php

index a43560b0190e1b9abec585c8592bdd5f1745a7df..f487de7661821b72af445d27b676935d342cf652 100644 (file)
@@ -40,7 +40,7 @@ class User
         * @return boolean|array
         */
        public static function getOwnerDataById($uid) {
-               $r = dba::p("SELECT
+               $r = dba::fetch_first("SELECT
                        `contact`.*,
                        `user`.`prvkey` AS `uprvkey`,
                        `user`.`timezone`,
@@ -54,14 +54,14 @@ class User
                        INNER JOIN `user`
                                ON `user`.`uid` = `contact`.`uid`
                        WHERE `contact`.`uid` = ?
-                       AND `contact`.`self` = 1
+                       AND `contact`.`self`
                        LIMIT 1",
                        $uid
                );
                if (!DBM::is_result($r)) {
                        return false;
                }
-               return $r[0];
+               return $r;
        }
 
        /**