mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 21:01:02 -05:00
fixed errors with custom welcome messages
This commit is contained in:
parent
efebcdec0f
commit
9726b41b7b
1 changed files with 4 additions and 4 deletions
|
@ -328,7 +328,7 @@ class AccountConfirmSubmission {
|
||||||
$this->createUserPage( $user );
|
$this->createUserPage( $user );
|
||||||
|
|
||||||
# Greet the new user if set to do so.
|
# Greet the new user if set to do so.
|
||||||
$this->createUserTalkPage( $user, $this->reason );
|
$this->createUserTalkPage( $user );
|
||||||
|
|
||||||
return array( true, null );
|
return array( true, null );
|
||||||
}
|
}
|
||||||
|
@ -442,17 +442,17 @@ class AccountConfirmSubmission {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function createUserTalkPage( User $user, String $message = '' ) {
|
protected function createUserTalkPage( User $user ) {
|
||||||
global $wgAutoWelcomeNewUsers;
|
global $wgAutoWelcomeNewUsers;
|
||||||
|
|
||||||
if ( $wgAutoWelcomeNewUsers ) {
|
if ( $wgAutoWelcomeNewUsers ) {
|
||||||
if ($message == '') {
|
if ($this->reason == '') {
|
||||||
$msg = "confirmaccount-welc-pos{$this->type}";
|
$msg = "confirmaccount-welc-pos{$this->type}";
|
||||||
$welcome = wfEmptyMsg( $msg )
|
$welcome = wfEmptyMsg( $msg )
|
||||||
? wfMessage( 'confirmaccount-welc' )->text()
|
? wfMessage( 'confirmaccount-welc' )->text()
|
||||||
: wfMessage( $msg )->text(); // custom message
|
: wfMessage( $msg )->text(); // custom message
|
||||||
} else {
|
} else {
|
||||||
$welcome = $message;
|
$welcome = $this->reason;
|
||||||
}
|
}
|
||||||
# Add user welcome message!
|
# Add user welcome message!
|
||||||
$article = new WikiPage( $user->getTalkPage() );
|
$article = new WikiPage( $user->getTalkPage() );
|
||||||
|
|
Loading…
Reference in a new issue