mirror of
https://github.com/friendica/friendica
synced 2024-11-19 11:03:40 +00:00
Display the user fields for the admin account
This commit is contained in:
parent
319ceeda3b
commit
d8d96e6e61
2 changed files with 8 additions and 4 deletions
|
@ -69,8 +69,12 @@ class Account extends BaseFactory
|
|||
|
||||
$apcontact = APContact::getByURL($publicContact['url'], false);
|
||||
|
||||
$profileFields = $this->profileField->select(['uid' => $uid, 'psid' => PermissionSet::PUBLIC]);
|
||||
$fields = $this->mstdnField->createFromProfileFields($profileFields);
|
||||
if (!empty($userContact['self'])) {
|
||||
$profileFields = $this->profileField->select(['uid' => $uid, 'psid' => PermissionSet::PUBLIC]);
|
||||
$fields = $this->mstdnField->createFromProfileFields($profileFields);
|
||||
} else {
|
||||
$fields = new Fields();
|
||||
}
|
||||
|
||||
return new \Friendica\Object\Api\Mastodon\Account($this->baseUrl, $publicContact, $fields, $apcontact, $userContact);
|
||||
}
|
||||
|
|
|
@ -93,8 +93,8 @@ class Instance extends BaseEntity
|
|||
$adminList = explode(',', str_replace(' ', '', DI::config()->get('config', 'admin_email')));
|
||||
$administrator = User::getByEmail($adminList[0], ['nickname']);
|
||||
if (!empty($administrator)) {
|
||||
$adminContact = DBA::selectFirst('contact', ['id'], ['nick' => $administrator['nickname'], 'self' => true]);
|
||||
$instance->contact_account = DI::mstdnAccount()->createFromContactId($adminContact['id']);
|
||||
$adminContact = DBA::selectFirst('contact', ['id', 'uid'], ['nick' => $administrator['nickname'], 'self' => true]);
|
||||
$instance->contact_account = DI::mstdnAccount()->createFromContactId($adminContact['id'], $adminContact['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue