mirror of
https://github.com/friendica/friendica
synced 2025-04-25 23:10:12 +00:00
AP: Always sign requests
This commit is contained in:
parent
dca1fa06bf
commit
e06d9f20cf
4 changed files with 48 additions and 29 deletions
|
@ -130,21 +130,13 @@ class Friendica extends BaseModule
|
|||
$register_policy = $register_policies[$register_policy_int];
|
||||
}
|
||||
|
||||
$condition = [];
|
||||
$admin = false;
|
||||
if (!empty($config->get('config', 'admin_nickname'))) {
|
||||
$condition['nickname'] = $config->get('config', 'admin_nickname');
|
||||
}
|
||||
if (!empty($config->get('config', 'admin_email'))) {
|
||||
$adminList = explode(',', str_replace(' ', '', $config->get('config', 'admin_email')));
|
||||
$condition['email'] = $adminList[0];
|
||||
$administrator = User::getByEmail($adminList[0], ['username', 'nickname']);
|
||||
if (!empty($administrator)) {
|
||||
$admin = [
|
||||
'name' => $administrator['username'],
|
||||
'profile' => DI::baseUrl()->get() . '/profile/' . $administrator['nickname'],
|
||||
];
|
||||
}
|
||||
$admin = [];
|
||||
$administrator = User::getFirstAdmin(['username', 'nickname']);
|
||||
if (!empty($administrator)) {
|
||||
$admin = [
|
||||
'name' => $administrator['username'],
|
||||
'profile' => DI::baseUrl()->get() . '/profile/' . $administrator['nickname'],
|
||||
];
|
||||
}
|
||||
|
||||
$visible_addons = Addon::getVisibleList();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue