Index: trunk/extensions/SemanticSignup/includes/SES_Special.php |
— | — | @@ -75,14 +75,19 @@ |
76 | 76 | |
77 | 77 | global $wgLoginLanguageSelector; |
78 | 78 | $language = $this->mUserDataChecker->mLanguage; |
79 | | - if( $wgLoginLanguageSelector && $language ) |
| 79 | + |
| 80 | + if( $wgLoginLanguageSelector && $language ) { |
80 | 81 | $user->setOption( 'language', $language ); |
| 82 | + } |
81 | 83 | |
82 | 84 | global $wgEmailAuthentication; |
83 | | - if( $wgEmailAuthentication && User::isValidEmailAddr( $user->getEmail() ) ){ |
84 | | - $err = $user->sendConfirmationMail(); |
85 | | - if (WikiError::isError($err)) |
86 | | - throw new Exception(wfMsg('emailfailed')); |
| 85 | + |
| 86 | + if( $wgEmailAuthentication && User::isValidEmailAddr( $user->getEmail() ) ) { |
| 87 | + $status = $user->sendConfirmationMail(); |
| 88 | + |
| 89 | + if ( !$status->isGood() ) { |
| 90 | + throw new Exception( wfMsg( 'emailfailed' ) . "\n" . $status->getMessage() ); |
| 91 | + } |
87 | 92 | } |
88 | 93 | |
89 | 94 | $user->saveSettings(); |
— | — | @@ -128,7 +133,7 @@ |
129 | 134 | $form_definition = $form->getContent(); |
130 | 135 | |
131 | 136 | global $sfgFormPrinter; |
132 | | - //var_dump($sfgFormPrinter);exit; |
| 137 | + |
133 | 138 | list ($form_text, $javascript_text, $data_text, $form_page_title, $generated_page_name) = |
134 | 139 | $sfgFormPrinter->formHTML($form_definition, false, false); |
135 | 140 | |