if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
-# You have 24 hours to claim your password
+// You have 24 hours to claim your password
define('MAX_RECOVERY_TIME', 24 * 60 * 60);
$touched = strtotime($confirm->modified);
$email = $confirm->address;
- # Burn this code
+ // Burn this code
$result = $confirm->delete();
return;
}
- # These should be reaped, but for now we just check mod time
- # Note: it's still deleted; let's avoid a second attempt!
+ // These should be reaped, but for now we just check mod time
+ // Note: it's still deleted; let's avoid a second attempt!
if ((time() - $touched) > MAX_RECOVERY_TIME) {
common_log(LOG_WARNING,
return;
}
- # If we used an outstanding confirmation to send the email,
- # it's been confirmed at this point.
+ // If we used an outstanding confirmation to send the email,
+ // it's been confirmed at this point.
if (!$user->email) {
$orig = clone($user);
}
}
- # Success!
+ // Success!
$this->setTempUser($user);
$this->showPasswordForm();
}
}
- # See if it's an unconfirmed email address
+ // See if it's an unconfirmed email address
if (!$user) {
// Warning: it may actually be legit to have multiple folks
return;
}
- # Try to get an unconfirmed email address if they used a user name
+ // Try to get an unconfirmed email address if they used a user name
if (!$user->email && !$confirm_email) {
$confirm_email = new Confirm_address();
return;
}
- # Success! We have a valid user and a confirmed or unconfirmed email address
+ // Success! We have a valid user and a confirmed or unconfirmed email address
$confirm = new Confirm_address();
$confirm->code = common_confirmation_code(128);
function resetPassword()
{
- # CSRF protection
+ // CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
// TRANS: Form validation error message.
return;
}
- # OK, we're ready to go
+ // OK, we're ready to go
$original = clone($user);