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.
 * We are also having these problems - they don't seem to be browser-related, and are difficult to replicate. But some users in some places, on trying to request an account, it doesn't seem to execute and stays on the account registration page. Aaron, can you help? - Jtneill 01:29, 4 October 2007 (UTC)
 * Note further discussion is also available on User_talk:Voice_of_All - Jtneill 01:39, 4 October 2007 (UTC)

Spam prevention?
For people using this, does it help with spam prevention? I just added a capatcha script but I'm looking at my user list and there are a lot of spam generating user names on there. Has it helped cut down on spam or does it seem to deter legitimate users? --76.214.233.199 17:51, 27 September 2007 (UTC)
 * It doesn't hurt, since if it's only for creation it's a one time think. This extension is mainly for open sites that want at least halfway trustworthy users (or PhDs, whatever criteria they use to confirm). If the throw away accounts don't actually edit anything, then I'd leave it alone. If spam keeps appearing, I'd try another extension first, with anon-page creation disabled (if not already). If that fails, then try this. Aaron 18:39, 27 September 2007 (UTC)

Working all right so far
We finally installed this and it's working excellently so far! --Larry Sanger

Send account request to list of users
Here is a modification, based on Sschwengel's modification. It will send an email notification to all users specified in the array, rather than to just the administrator. To use this code, place it in the same location as Sschwengel's code.

Nynexman4464 21:23, 13 October 2007 (UTC)


 * Anyone have any suggestions on getting this mod to work? I've added the above code into the ConfirmAccounts_body.php and I've tried putting the  array in the LocalSettings.php and at the top of ConfirmAccounts_body.php, but nothing I've tried will send an email to the specified address. I've also thought that the array should list the wiki username and use the associated email address, but that didn't work either. Here's my array. What am I doing wrong?
 * Takieyda 00:32, 25 October 2007 (UTC)
 * Takieyda 00:32, 25 October 2007 (UTC)

Eliminating ToS checkbox
I don't need the checkbox at the end of the RequestAccount-page. A quick look in the sourcecode let me assume there is a boolean preference variable for this (something with ToS for Terms of Service?!), but I'm missing the documentation. Can someone give me the name of that variable or a hint on how to find it (see snippet from ConfirmAccount_body.php below):

$this->mToS = $wgRequest->getBool('wpToS');

Thanks, --Arnd 06:50, 25 October 2007 (UTC)


 * Forget this, I took a deeper look into the source-code and recognized there is no such variable. Therefore I implemented some (see the following chapter).

Patch make the RequestAccount-page more flexible
As I wrote above, I do not need such ab big RequestAccount-page with so many text-fields. In order not to discourage my potential wiki users from submitting an account request, I introduced some more variables to switch off several parts of the page:

With this patch applied to ConfirmAccount_body.php (version: r26938)
 * $wgAccountRequestToSEnable enables "the Terms Of Service"-checkbox at the bottom of the page (if set to true)
 * $wgAccountRequestExtendedInfo enables the second field with the resume-upload, web-pages and so on (if set to true)
 * Additionally, the Upload-File text field is hidden if $wgAllowAccountRequestFiles is set to false (since it is of no use in this case).

Please mind that both, $wgAccountRequestToSEnable and $wgAccountRequestExtendedInfo, are treated as false by default, since I did not include a default setting in SpecialConfirmAccount.php. So it's best to include them in your LocalSettings.php, independent from their value.

Aaron, I would appreciate if you would review my patch and maybe include it in your extension. Please excuse my mistakes (if any :-) ), but I'm not familiar with neither php nor mediawiki extension programming. Never the less I think it's important to make the RequestAccount-page more flexible (in particular with the new features you just implemented) so that new users don't get scared by all these informations they have to provide just to get access to a small wiki (which it is in my case but may not be in others).

--Arnd 14:45, 25 October 2007 (UTC)

Bug in ConfirmAccount.sql
There is a bug in ConfirmAccount.sql in version r26938 which lead to failure message from mysql while the table was created (at least in my installation). The following patch solved this for me:

--Arnd 14:45, 25 October 2007 (UTC)
 * Fixed. Aaron 17:18, 25 October 2007 (UTC)