Use "Welcome, <user>" as title on successful account creation.
Create separate displaySuccessfulAccountCreation() function that
uses new welcomeuser and welcomecreation-agora messages split from
existing welcomecreation message.
Change-Id: I087c272952e5b2a271411764d368f723719cd0e3
*/
wfRunHooks( 'BeforeWelcomeCreation', array( &$welcome_creation_msg, &$injected_html ) );
- $this->displaySuccessfulLogin( $welcome_creation_msg, $injected_html );
+ $this->displaySuccessfulAccountCreation( $welcome_creation_msg, $injected_html );
+ }
+
+ /**
+ * Display an "account creation successful" page.
+ * @param $msgname string
+ * @param $injected_html string
+ */
+ private function displaySuccessfulAccountCreation( $msgname, $injected_html ) {
+ $out = $this->getOutput();
+ $out->setPageTitle( $this->msg( 'welcomeuser', $this->getUser()) );
+ if( $msgname ){
+ $out->addWikiMsg( $msgname, wfEscapeWikiText( $this->getUser()->getName() ) );
+ }
+
+ $out->addHTML( $injected_html );
+
+ $this->executeReturnTo( 'success' );
}
/**
You can continue to use {{SITENAME}} anonymously, or you can <span class='plainlinks'>[$1 log in again]</span> as the same or as a different user.
Note that some pages may continue to be displayed as if you were still logged in, until you clear your browser cache.",
+'welcomeuser' => 'Welcome, $1!',
'welcomecreation' => '== Welcome, $1! ==
Your account has been created.
Do not forget to change your [[Special:Preferences|{{SITENAME}} preferences]].',
+'welcomecreation-agora' => 'Your account has been created.
+Do not forget to change your [[Special:Preferences|{{SITENAME}} preferences]].',
'yourname' => 'Username:',
'yourpassword' => 'Password:',
'yourpasswordagain' => 'Retype password:',
# Login and logout pages
'logouttext' => 'Log out message
* $1 is an URL to [[Special:Userlogin]] containing returnto and returntoquery parameters',
+'welcomeuser' => 'Text for a welcome heading that users see after registering a user account. $1 is the username of the new user. See [[bugzilla:42215]',
'welcomecreation' => 'The welcome message users see after registering a user account. $1 is the username of the new user.',
+'welcomecreation-agora' => 'A welcome message users see after registering a user account, following a welcomeuser heading. $1 is the username of the new user.',
'yourname' => "In user preferences
<nowiki>{{</nowiki>[[Gender|GENDER]]<nowiki>}}</nowiki> is '''NOT''' supported.
),
'login' => array(
'logouttext',
+ 'welcomeuser',
'welcomecreation',
+ 'welcomecreation-agora',
'yourname',
'yourpassword',
'yourpasswordagain',