Extension talk:ConfirmAccount/archive 1

Send account request to Administrator
After a new user confirmed the e-mail of his account request, the administrator receive an e-mail notification about this pending request with a direct link to Special:ConfirmAccounts. Tested in english an german.

Patch function in extensions/ConfirmAccount/ConfirmAccount_body.php
function confirmEmailToken( $code ) { global $wgUser, $wgOut; # Confirm if this token is in the pending requests $name = $this->requestFromEmailToken( $code ); if( $name !== false ) { # Send mail to admin after e-mail has been confirmed global $wgEmergencyContact; $u = User::newFromName( $name, 'creatable' ); $u->setEmail( $wgEmergencyContact ); $title = Title::makeTitle( NS_SPECIAL, 'ConfirmAccounts' ); $url = $title->getFullUrl; $u->sendMail (wfMsg('requestaccount-email-subj-admin'),                               wfMsg('requestaccount-email-body-admin', $name, $url)); $this->confirmEmail( $name ); $wgOut->addWikiText( wfMsgHtml( 'request-account-econf' )); $wgOut->returnToMain; return; }               # Maybe the user confirmed after account was created... $user = User::newFromConfirmationCode( $code ); if( is_object( $user ) ) { if( $user->confirmEmail ) { $message = $wgUser->isLoggedIn ? 'confirmemail_loggedin' : 'confirmemail_success'; $wgOut->addWikiText( wfMsg( $message ) ); if( !$wgUser->isLoggedIn ) { $title = SpecialPage::getTitleFor( 'Userlogin' ); $wgOut->returnToMain( true, $title->getPrefixedText ); }                       } else { $wgOut->addWikiText( wfMsg( 'confirmemail_error' ) ); }               } else { $wgOut->addWikiText( wfMsg( 'confirmemail_invalid' ) ); }       }

Translation file
Get the translation file from rrosenfeld at http://www.spinnaker.de/tmp/ConfirmAccount.i18n.php.txt and extend the english and german section:

English section: 'requestaccount-email-subj-admin' => ' Request account', 'requestaccount-email-body-admin' => 'The account "$1" has request an account and is waiting for confirmation. The e-mail address has been confirmed. You can confirm the request here "$2".',

German section: 'requestaccount-email-subj-admin' => ' Antrag auf Account', 'requestaccount-email-body-admin' => 'Das Benutzerkonto "$1" hat einen Antrag auf einen Account gestellt. Die Emailadresse wurde bereits bestätigt. Du kannst den Antrag unter "$2" freischalten.',

regards --schweny 22:50, 13 August 2007 (UTC)

Extension don't work in opera/IE
When I press "Request account" button in Opera/IE/Konqueror page only reloads and nothing happens (I'm using latest version of MediaWiki).

What do you think about this ugly bug?
 * Works fine for me. Aaron 19:23, 26 August 2007 (UTC)
 * Very interesting... ;) I'm checked the source and found that this line returns false:

$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) )
 * I have tested it in IE 5, Opera 9.23 (under linux), Konqueror 3.5.6 and Firefox 2.0.6. And only in Firefox all works fine :(
 * I fixed some fucked up non-XHTML valid html. Maybe it will work for you now. Either way, it worked on IE 7/Opera 9.2/FF 2.0.6 for me. Aaron 06:27, 27 August 2007 (UTC)
 * I am having the same problem as the first fellow. Can you post the revised html so that I do not have to reload the entire extension?  Thanks.  8 September 2007.