mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 21:01:02 -05:00
improved admin interface (#6)
This commit is contained in:
parent
1f8d97bbaf
commit
7fda23dc76
4 changed files with 13 additions and 8 deletions
|
@ -111,8 +111,12 @@ class AccountRequestSubmission {
|
|||
return array('pwds_no_match', 'The passwords did not match.');
|
||||
}
|
||||
|
||||
if (strlen($_POST['pwd1']) <= 4) {
|
||||
return array('pwd_too_short', 'The password is too short');
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
return array('no_comment', 'It does not appear you commented the verification code on the specified project. Please try again.');
|
||||
return array('no_comment', $this->msg('requestaccount-nocomment-error'));
|
||||
}
|
||||
|
||||
$u = User::newFromName( $this->userName, 'creatable' );
|
||||
|
|
|
@ -75,7 +75,8 @@ You cannot make any more requests.",
|
|||
'requestaccount-code-troubleshoot' => '\'\'\'Note:\'\'\' If you are having problems with user verification not working, please see our [[Scratch_Wiki:Become a contributor/Verification code troubleshooting|troubleshooting page]]',
|
||||
'requestaccount-set-pwd' => 'Set password',
|
||||
'requestaccount-project-info' => 'Please go to the [$1 user verification project] and comment the following code:<br />\'\'\'$2\'\'\'',
|
||||
'requestaccount-project-link' => 'http://scratch.mit.edu/projects/10135908/'
|
||||
'requestaccount-project-link' => 'http://scratch.mit.edu/projects/10135908/',
|
||||
'requestaccount-nocomment-error' => 'It does not appear you commented the verification code on the specified project. Please try again.',
|
||||
);
|
||||
|
||||
/** Message documentation (Message documentation)
|
||||
|
|
|
@ -295,13 +295,13 @@ class ConfirmAccountsPage extends SpecialPage {
|
|||
$form .= '<legend>' . $this->msg( 'confirmaccount-leg-user' )->escaped() . '</legend>';
|
||||
$form .= '<table cellpadding=\'4\'>';
|
||||
$form .= "<tr><td>" . Xml::label( $this->msg( 'username' )->text(), 'wpNewName' ) . "</td>";
|
||||
$form .= "<td>" . Xml::input( 'wpNewName', 30, $this->reqUsername, array( 'id' => 'wpNewName' ) ) . "</td></tr>\n";
|
||||
$form .= '<td>' . Xml::input( 'wpNewName', 30, $this->reqUsername, array( 'id' => 'wpNewName', 'type' => 'hidden' ) ) . ' <a href="http://scratch.mit.edu/users/' . htmlspecialchars(str_replace(' ', '_', $this->reqUsername)) . '">' . htmlspecialchars($this->reqUsername) . '</a></td></tr>' . "\n";
|
||||
$econf = '';
|
||||
if ( $accountReq->getEmailAuthTimestamp() ) {
|
||||
/*if ( $accountReq->getEmailAuthTimestamp() ) {
|
||||
$econf = ' <strong>' . $this->msg( 'confirmaccount-econf' )->escaped() . '</strong>';
|
||||
}
|
||||
$form .= "<tr><td>" . $this->msg( 'confirmaccount-email' )->escaped() . "</td>";
|
||||
$form .= "<td>" . htmlspecialchars( $accountReq->getEmail() ) . $econf . "</td></tr>\n";
|
||||
$form .= "<td>" . htmlspecialchars( $accountReq->getEmail() ) . $econf . "</td></tr>\n";*/
|
||||
if ( count( $wgAccountRequestTypes ) > 1 ) {
|
||||
$options = array();
|
||||
$form .= "<tr><td><strong>" . $this->msg( 'confirmaccount-reqtype' )->escaped() . "</strong></td><td>";
|
||||
|
@ -661,8 +661,8 @@ class ConfirmAccountsPage extends SpecialPage {
|
|||
}
|
||||
}
|
||||
|
||||
# Every 30th view, prune old deleted items
|
||||
if ( 0 == mt_rand( 0, 29 ) ) {
|
||||
# Every 10th view, prune old deleted items
|
||||
if ( 0 == mt_rand( 0, 10 ) ) {
|
||||
ConfirmAccount::runAutoMaintenance();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue