mirror of
https://github.com/friendica/friendica
synced 2024-11-18 22:23:42 +00:00
Use the uid for the owner cache
This commit is contained in:
parent
45c12e7716
commit
87ac50e253
1 changed files with 4 additions and 4 deletions
|
@ -213,10 +213,10 @@ class User
|
|||
* @return boolean|array
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getOwnerDataById($uid, $check_valid = true)
|
||||
public static function getOwnerDataById(int $uid, bool $check_valid = true)
|
||||
{
|
||||
if (!empty(self::$owner)) {
|
||||
return self::$owner;
|
||||
if (!empty(self::$owner[$uid])) {
|
||||
return self::$owner[$uid];
|
||||
}
|
||||
|
||||
$owner = DBA::selectFirst('owner-view', [], ['uid' => $uid]);
|
||||
|
@ -262,7 +262,7 @@ class User
|
|||
$owner = self::getOwnerDataById($uid, false);
|
||||
}
|
||||
|
||||
self::$owner = $owner;
|
||||
self::$owner[$uid] = $owner;
|
||||
return $owner;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue