* (bug 3973) Use a separate message for the email content when an account is created by another user
This commit is contained in:
parent
d9bc198f17
commit
593d6a46f9
5 changed files with 24 additions and 5 deletions
|
|
@ -66,6 +66,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* Added --override switch for disabled pages in updateSpecialPages.php
|
||||
* Provide a unique message (ipb_blocked_as_range) if unblock of a single IP fails
|
||||
because it is part of a blocked range.
|
||||
* (bug 3973) Use a separate message for the email content when an account is
|
||||
created by another user
|
||||
|
||||
=== Bug fixes in 1.12 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class LoginForm {
|
|||
// Wipe the initial password and mail a temporary one
|
||||
$u->setPassword( null );
|
||||
$u->saveSettings();
|
||||
$result = $this->mailPasswordInternal( $u, false );
|
||||
$result = $this->mailPasswordInternal( $u, false, 'createaccount-title', 'createaccount-text' );
|
||||
|
||||
wfRunHooks( 'AddNewAccount', array( $u ) );
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ class LoginForm {
|
|||
return;
|
||||
}
|
||||
|
||||
$result = $this->mailPasswordInternal( $u, true );
|
||||
$result = $this->mailPasswordInternal( $u, true, 'passwordremindertitle', 'passwordremindertext' );
|
||||
if( WikiError::isError( $result ) ) {
|
||||
$this->mainLoginForm( wfMsg( 'mailerror', $result->getMessage() ) );
|
||||
} else {
|
||||
|
|
@ -544,10 +544,14 @@ class LoginForm {
|
|||
|
||||
|
||||
/**
|
||||
* @param object user
|
||||
* @param bool throttle
|
||||
* @param string message name of email title
|
||||
* @param string message name of email text
|
||||
* @return mixed true on success, WikiError on failure
|
||||
* @private
|
||||
*/
|
||||
function mailPasswordInternal( $u, $throttle = true ) {
|
||||
function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
|
||||
global $wgCookiePath, $wgCookieDomain, $wgCookiePrefix, $wgCookieSecure;
|
||||
global $wgServer, $wgScript;
|
||||
|
||||
|
|
@ -565,9 +569,9 @@ class LoginForm {
|
|||
$ip = wfGetIP();
|
||||
if ( '' == $ip ) { $ip = '(Unknown)'; }
|
||||
|
||||
$m = wfMsg( 'passwordremindertext', $ip, $u->getName(), $np, $wgServer . $wgScript );
|
||||
$m = wfMsg( $emailText, $ip, $u->getName(), $np, $wgServer . $wgScript );
|
||||
$result = $u->sendMail( wfMsg( $emailTitle ), $m );
|
||||
|
||||
$result = $u->sendMail( wfMsg( 'passwordremindertitle' ), $m );
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -572,6 +572,11 @@ Bevor eine E-Mail von anderen Benutzern über die {{SITENAME}}-Mailfunktion empf
|
|||
'invalidemailaddress' => 'Die E-Mail-Adresse wurde nicht akzeptiert, da sie ein ungültiges Format aufzuweisen scheint. Bitte gib eine Adresse in einem gültigen Format ein oder leere das Feld.',
|
||||
'accountcreated' => 'Benutzerkonto erstellt',
|
||||
'accountcreatedtext' => 'Das Benutzerkonto $1 wurde eingerichtet.',
|
||||
'createaccount-title' => 'Erstellung eines Benutzerkontos für {{SITENAME}}',
|
||||
'createaccount-text' => 'Jemand ($1) hat ein Benutzerkonto "$2" auf {{SITENAME}}.
|
||||
($4) erstellt. Das Passwort for "$2" ist "$3". Du solltest dich nun anmelden und dein Passwort ändern.
|
||||
|
||||
Du kannst diese Nachricht ignorieren, falls das Benutzerkonto durch einen Fehler angelegt wurde.',
|
||||
'loginlanguagelabel' => 'Sprache: $1',
|
||||
|
||||
# Password reset dialog
|
||||
|
|
|
|||
|
|
@ -891,6 +891,12 @@ will be sent for any of the following features.',
|
|||
format. Please enter a well-formatted address or empty that field.',
|
||||
'accountcreated' => 'Account created',
|
||||
'accountcreatedtext' => 'The user account for $1 has been created.',
|
||||
'createaccount-title' => 'Account creation for {{SITENAME}}',
|
||||
'createaccount-text' => 'Someone ($1) created an account for $2 on {{SITENAME}}
|
||||
($4). The password for "$2" is "$3". You should log in and change your password
|
||||
now.
|
||||
|
||||
You may ignore this message, if this account was created in error.',
|
||||
'loginlanguagelabel' => 'Language: $1',
|
||||
'loginlanguagelinks' => '* Deutsch|de
|
||||
* English|en
|
||||
|
|
|
|||
|
|
@ -406,6 +406,8 @@ $wgMessageStructure = array(
|
|||
'invalidemailaddress',
|
||||
'accountcreated',
|
||||
'accountcreatedtext',
|
||||
'createaccount-title',
|
||||
'createaccount-text',
|
||||
'loginlanguagelabel',
|
||||
'loginlanguagelinks',
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue