Use "getActorName"

This commit is contained in:
Michael 2020-08-22 18:52:37 +00:00
parent 6d9302fbe4
commit b12a2c486e
3 changed files with 11 additions and 14 deletions

View file

@ -513,11 +513,6 @@ class Site extends BaseAdmin
get_temppath();
get_itemcachepath();
$system_actor_name = DI::config()->get('system', 'actor_name');
if (empty($system_actor_name)) {
$system_actor_name = User::getActorName();
}
/* Register policy */
$register_choices = [
Register::CLOSED => DI::l10n()->t('Closed'),
@ -608,7 +603,7 @@ class Site extends BaseAdmin
// name, label, value, help string, extra data...
'$sitename' => ['sitename', DI::l10n()->t('Site name'), DI::config()->get('config', 'sitename'), ''],
'$sender_email' => ['sender_email', DI::l10n()->t('Sender Email'), DI::config()->get('config', 'sender_email'), DI::l10n()->t('The email address your server shall use to send notification emails from.'), '', '', 'email'],
'$system_actor_name' => ['system_actor_name', DI::l10n()->t('Name of the system actor'), $system_actor_name, DI::l10n()->t("Name of the internal system account that is used to perform ActivityPub requests. This must be an unused username. If set, this shouldn't be changed again.")],
'$system_actor_name' => ['system_actor_name', DI::l10n()->t('Name of the system actor'), User::getActorName(), DI::l10n()->t("Name of the internal system account that is used to perform ActivityPub requests. This must be an unused username. If set, this shouldn't be changed again.")],
'$banner' => ['banner', DI::l10n()->t('Banner/Logo'), $banner, ''],
'$email_banner' => ['email_banner', DI::l10n()->t('Email Banner/Logo'), $email_banner, ''],
'$shortcut_icon' => ['shortcut_icon', DI::l10n()->t('Shortcut icon'), DI::config()->get('system', 'shortcut_icon'), DI::l10n()->t('Link to an icon that will be used for browsers.')],

View file

@ -78,7 +78,7 @@ class Xrd extends BaseModule
$name = substr($local, 0, strpos($local, '@'));
}
if ($name == DI::config()->get('system', 'actor_name')) {
if ($name == User::getActorName()) {
$owner = User::getSystemAccount();
if (empty($owner)) {
throw new \Friendica\Network\HTTPException\NotFoundException();