mirror of
https://github.com/scratchfoundation/swiki-confirmaccount.git
synced 2024-12-04 21:01:02 -05:00
commit
189a15cf2f
3 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
ALTER TABLE /*$wgDBprefix*/account_requests
|
||||
ADD acr_type tinyint(255) unsigned NOT NULL default 0,
|
||||
DROP INDEX acr_deleted_reg,
|
||||
DROP INDEX IF EXISTS acr_deleted_reg,
|
||||
ADD INDEX acr_type_del_reg (acr_type,acr_deleted,acr_registration);
|
||||
|
||||
-- This stores all of credential information
|
||||
|
|
|
@ -90,7 +90,7 @@ class AccountRequestSubmission {
|
|||
}
|
||||
|
||||
//before we continue, verify user
|
||||
$code = sha1($_SERVER['REMOTE_ADDR'] . date('m'));
|
||||
$code = preg_replace('%\d+%', '', sha1($_SERVER['REMOTE_ADDR'] . date('m')));
|
||||
$data = file_get_contents('http://scratch.mit.edu/site-api/comments/project/10135908/?page=1&salt=' . md5(time())); //add the salt so it doesn't cache
|
||||
if (!$data) {
|
||||
return array('api_failed', 'Accessing the API to verify your registration failed. Please try again later.');
|
||||
|
|
|
@ -212,7 +212,7 @@ class RequestAccountPage extends SpecialPage {
|
|||
//Scratch user verification
|
||||
$form .= '<fieldset>';
|
||||
$form .= '<legend>User verification</legend>';
|
||||
$form .= '<p>Please go to the <a href="http://scratch.mit.edu/projects/10135908/">user verification project</a> and comment the following code:<br /><b>' . sha1($_SERVER['REMOTE_ADDR'] . date('m')) . '</b></p>' . "\n";
|
||||
$form .= '<p>Please go to the <a href="http://scratch.mit.edu/projects/10135908/">user verification project</a> and comment the following code:<br /><b>' . preg_replace('%\d+%', '', sha1($_SERVER['REMOTE_ADDR'] . date('m'))) . '</b></p>' . "\n";
|
||||
$form .= '</fieldset>';
|
||||
|
||||
//Set temporary password
|
||||
|
|
Loading…
Reference in a new issue