Merge pull request #8026 from nupplaphil/task/l10n_immutable

Make L10n immutable
This commit is contained in:
Hypolite Petovan 2019-12-29 13:54:32 -05:00 committed by GitHub
commit a9220aa83b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 114 additions and 171 deletions

View file

@ -38,17 +38,16 @@ function user_allow($hash)
Worker::add(PRIORITY_LOW, "Directory", $url);
}
L10n::pushLang($register['language']);
$l10n = L10n::withLang($register['language']);
$res = User::sendRegisterOpenEmail(
$l10n,
$user,
Config::get('config', 'sitename'),
$a->getBaseUrl(),
($register['password'] ?? '') ?: 'Sent in a previous email'
);
L10n::popLang();
if ($res) {
info(L10n::t('Account approved.') . EOL);
return true;