- $fields = ['name', 'url', 'location', 'about', 'avatar', 'photo'];
- $contact = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]);
- if (!DBA::isResult($contact)) {
- return [];
+ $fields = ['name', 'url', 'location', 'about', 'avatar', 'photo'];
+ $contact = DBA::selectFirst('contact', $fields, ['uid' => $uid, 'self' => true]);
+ if (!DBA::isResult($contact)) {
+ return [];
+ }
+ } else {
+ $contact = User::getSystemAccount();
+ $user = ['guid' => '', 'nickname' => $contact['nick'], 'pubkey' => $contact['pubkey'],
+ 'account-type' => $contact['contact-type'], 'page-flags' => User::PAGE_FLAGS_NORMAL];
+ $profile = ['locality' => '', 'region' => '', 'country-name' => ''];