Merge pull request #4096 from annando/fix-pr-4095

Fix for PR 4095
This commit is contained in:
Michael Vogel 2017-12-18 10:24:11 +01:00 committed by GitHub
commit ea4995a6a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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