Return system account data when fetching data for user "0"

This commit is contained in:
Michael 2020-08-23 07:29:56 +00:00
parent fc2340d4af
commit b61eacdadb
1 changed files with 6 additions and 2 deletions

View File

@ -118,8 +118,8 @@ class User
} }
} }
$system['spubkey'] = $system['uprvkey'] = $system['prvkey']; $system['sprvkey'] = $system['uprvkey'] = $system['prvkey'];
$system['username'] = $system['name']; $system['spubkey'] = $system['upubkey'] = $system['pubkey'];
$system['nickname'] = $system['nick']; $system['nickname'] = $system['nick'];
return $system; return $system;
} }
@ -332,6 +332,10 @@ class User
*/ */
public static function getOwnerDataById(int $uid, bool $check_valid = true) public static function getOwnerDataById(int $uid, bool $check_valid = true)
{ {
if ($uid == 0) {
return self::getSystemAccount();
}
if (!empty(self::$owner[$uid])) { if (!empty(self::$owner[$uid])) {
return self::$owner[$uid]; return self::$owner[$uid];
} }