mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Centralize config.admin_email management in Model\User
This commit is contained in:
parent
cbe8d463b1
commit
fe547b7851
11 changed files with 134 additions and 134 deletions
|
@ -113,12 +113,9 @@ class Account extends BaseSettings
|
|||
$err .= DI::l10n()->t('Invalid email.');
|
||||
}
|
||||
// ensure new email is not the admin mail
|
||||
if (DI::config()->get('config', 'admin_email')) {
|
||||
$adminlist = explode(",", str_replace(" ", "", strtolower(DI::config()->get('config', 'admin_email'))));
|
||||
if (in_array(strtolower($email), $adminlist)) {
|
||||
$err .= DI::l10n()->t('Cannot change to that email.');
|
||||
$email = $user['email'];
|
||||
}
|
||||
if (in_array(strtolower($email), User::getAdminEmailList())) {
|
||||
$err .= DI::l10n()->t('Cannot change to that email.');
|
||||
$email = $user['email'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue