Merge pull request #6371 from MrPetovan/bug/6370-use-nickname-in-register-emails

Use nickname instead of email for Login Name
This commit is contained in:
Michael Vogel 2019-01-04 05:40:29 +01:00 committed by GitHub
commit 1f7ffce07a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -1752,7 +1752,7 @@ function admin_page_users_post(App $a)
Thank you and welcome to %4$s.'));
$preamble = sprintf($preamble, $user['username'], Config::get('config', 'sitename'));
$body = sprintf($body, System::baseUrl(), $user['email'], $result['password'], Config::get('config', 'sitename'));
$body = sprintf($body, System::baseUrl(), $user['nickname'], $result['password'], Config::get('config', 'sitename'));
notification([
'type' => SYSTEM_EMAIL,

View file

@ -21,7 +21,7 @@ function lostpass_post(App $a)
}
$condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame];
$user = DBA::selectFirst('user', ['uid', 'username', 'email', 'language'], $condition);
$user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'language'], $condition);
if (!DBA::isResult($user)) {
notice(L10n::t('No valid account found.') . EOL);
$a->internalRedirect();
@ -63,7 +63,7 @@ function lostpass_post(App $a)
The login details are as follows:
Site Location: %2$s
Login Name: %3$s', $resetlink, System::baseUrl(), $user['email']));
Login Name: %3$s', $resetlink, System::baseUrl(), $user['nickname']));
notification([
'type' => SYSTEM_EMAIL,
@ -85,7 +85,7 @@ function lostpass_content(App $a)
if ($a->argc > 1) {
$pwdreset_token = $a->argv[1];
$user = DBA::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]);
$user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]);
if (!DBA::isResult($user)) {
notice(L10n::t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed."));
@ -161,7 +161,7 @@ function lostpass_generate_password($user)
Password: %3$s
You may change that password from your account settings page after logging in.
', System::baseUrl(), $user['email'], $new_password));
', System::baseUrl(), $user['nickname'], $new_password));
notification([
'type' => SYSTEM_EMAIL,

View file

@ -771,7 +771,7 @@ class User
If you ever want to delete your account, you can do so at %3$s/removeme
Thank you and welcome to %2$s.',
$user['email'], $sitename, $siteurl, $user['username'], $password
$user['nickname'], $sitename, $siteurl, $user['username'], $password
));
return notification([