Index: trunk/extensions/ConfirmEdit/ConfirmEdit_body.php |
— | — | @@ -145,8 +145,12 @@ |
146 | 146 | * @return bool true to keep running callbacks |
147 | 147 | */ |
148 | 148 | function injectUserCreate( &$template ) { |
149 | | - global $wgCaptchaTriggers, $wgOut; |
| 149 | + global $wgCaptchaTriggers, $wgOut, $wgUser; |
150 | 150 | if( $wgCaptchaTriggers['createaccount'] ) { |
| 151 | + if( $wgUser->isAllowed( 'skipcaptcha' ) ) { |
| 152 | + wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" ); |
| 153 | + return true; |
| 154 | + } |
151 | 155 | $template->set( 'header', |
152 | 156 | "<div class='captcha'>" . |
153 | 157 | $wgOut->parse( $this->getMessage( 'createaccount' ) ) . |
— | — | @@ -513,8 +517,12 @@ |
514 | 518 | * @return bool true to continue, false to abort user creation |
515 | 519 | */ |
516 | 520 | function confirmUserCreate( $u, &$message ) { |
517 | | - global $wgCaptchaTriggers; |
| 521 | + global $wgCaptchaTriggers, $wgUser; |
518 | 522 | if( $wgCaptchaTriggers['createaccount'] ) { |
| 523 | + if( $wgUser->isAllowed( 'skipcaptcha' ) ) { |
| 524 | + wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" ); |
| 525 | + return true; |
| 526 | + } |
519 | 527 | $this->trigger = "new account '" . $u->getName() . "'"; |
520 | 528 | if( !$this->passCaptcha() ) { |
521 | 529 | $message = wfMsg( 'captcha-createaccount-fail' ); |