+ /**
+ * @brief Get owner data by user id
+ *
+ * @param int $uid
+ * @return boolean|array
+ */
+ public static function getOwnerDataById($uid) {
+ $r = dba::fetch_first("SELECT
+ `contact`.*,
+ `user`.`prvkey` AS `uprvkey`,
+ `user`.`timezone`,
+ `user`.`nickname`,
+ `user`.`sprvkey`,
+ `user`.`spubkey`,
+ `user`.`page-flags`,
+ `user`.`account-type`,
+ `user`.`prvnets`
+ FROM `contact`
+ INNER JOIN `user`
+ ON `user`.`uid` = `contact`.`uid`
+ WHERE `contact`.`uid` = ?
+ AND `contact`.`self`
+ LIMIT 1",
+ $uid
+ );
+ if (!DBM::is_result($r)) {
+ return false;
+ }
+ return $r;
+ }
+