Issue 14231: Automatically add the relay owner as contact person

This commit is contained in:
Michael 2024-06-16 17:04:43 +00:00
parent eb6297c472
commit a27d55f6cf
7 changed files with 341 additions and 271 deletions

View file

@ -330,6 +330,11 @@ class Account extends BaseSettings
}
User::setCommunityUserSettings(DI::userSession()->getLocalUserId());
if ($account_type == User::ACCOUNT_TYPE_RELAY) {
Profile::setResponsibleRelayContact(DI::userSession()->getLocalUserId());
}
DI::baseUrl()->redirect($redirectUrl);
}
@ -425,7 +430,7 @@ class Account extends BaseSettings
$user['account-type'] = User::ACCOUNT_TYPE_COMMUNITY;
}
if (DI::config()->get('system', 'allow_relay_channels')) {
if (!empty($user['parent-uid']) && DI::config()->get('system', 'allow_relay_channels')) {
$account_relay = [
'account-type',
DI::l10n()->t('Channel Relay'),