}
$isAutoCreated = false;
- if ( 0 == $u->getID() ) {
+ if ( $u->getID() == 0 ) {
$status = $this->attemptAutoCreate( $u );
if ( $status !== self::SUCCESS ) {
return $status;
} else {
global $wgExternalAuthType, $wgAutocreatePolicy;
if ( $wgExternalAuthType && $wgAutocreatePolicy != 'never'
- && is_object( $this->mExtUser )
- && $this->mExtUser->authenticate( $this->mPassword ) ) {
+ && is_object( $this->mExtUser )
+ && $this->mExtUser->authenticate( $this->mPassword )
+ ) {
# The external user and local user have the same name and
# password, so we assume they're the same.
$this->mExtUser->linkToLocal( $u->getID() );
*/
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:',
'backend-fail-notsame' => 'A non-identical file already exists at "$1".',
'backend-fail-invalidpath' => '"$1" is not a valid storage path.',
'backend-fail-delete' => 'Could not delete file "$1".',
+'backend-fail-describe' => 'Could not change metadata for file "$1".',
'backend-fail-alreadyexists' => 'The file "$1" already exists.',
'backend-fail-store' => 'Could not store file "$1" at "$2".',
'backend-fail-copy' => 'Could not copy file "$1" to "$2".',
{{Identical|Find}}',
'qbbrowse' => '{{Identical|Browse}}',
'qbedit' => '{{Identical|Edit}}',
-'qbmyoptions' => '{{Identical|My pages}}',
+'qbmyoptions' => 'Heading in the Cologne Blue skin user menu containing links to user (talk) page, preferences, watchlist, etc.
+{{Identical|My pages}}',
'qbspecialpages' => '{{Identical|Special pages}}',
'faqpage' => "FAQ is short for ''frequently asked questions''. This page is only linked on some of the old skins, not in Monobook or Modern.
# 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.
* $1 is a storage path.',
'backend-fail-delete' => 'Parameters:
* $1 is a file path.',
+'backend-fail-describe' => 'Parameters:
+* $1 is a file path.',
'backend-fail-alreadyexists' => 'Parameters:
* $1 is a filename.',
'backend-fail-store' => 'Parameters:
Start with a lowercase letter, unless the first word is “SVG”.',
'svg-long-desc-animated' => 'Displayed under an SVG image at the image description page if the image is animated. Non-animated images use {{msg-mw|svg-long-desc}}.
* $1 is the width in pixels
-* $2 is the height in pixels, and
+* $2 is the height in pixels, and
* $3 is the file size including a unit (for example "10 KB").
Start with a lowercase letter, unless the first word is “SVG”.',
),
'login' => array(
'logouttext',
+ 'welcomeuser',
'welcomecreation',
+ 'welcomecreation-agora',
'yourname',
'yourpassword',
'yourpasswordagain',
'backend-fail-notsame',
'backend-fail-invalidpath',
'backend-fail-delete',
+ 'backend-fail-describe',
'backend-fail-alreadyexists',
'backend-fail-store',
'backend-fail-copy',