r81868 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81867‎ | r81868 | r81869 >
Date:02:32, 10 February 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
*(bug 27159) make email confirmation code expiration time configurable

Added "$wgUserEmailConfirmationTokenExpiry"
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2982,8 +2982,9 @@
29832983 * @private
29842984 */
29852985 function confirmationToken( &$expiration ) {
 2986+ global $wgUserEmailConfirmationTokenExpiry;
29862987 $now = time();
2987 - $expires = $now + 7 * 24 * 60 * 60;
 2988+ $expires = $now + $wgUserEmailConfirmationTokenExpiry;
29882989 $expiration = wfTimestamp( TS_MW, $expires );
29892990 $token = self::generateToken( $this->mId . $this->mEmail . $expires );
29902991 $hash = md5( $token );
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1046,6 +1046,11 @@
10471047 $wgNewPasswordExpiry = 3600 * 24 * 7;
10481048
10491049 /**
 1050+ * The time, in seconds, when an email confirmation email expires
 1051+ */
 1052+$wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
 1053+
 1054+/**
10501055 * SMTP Mode
10511056 * For using a direct (authenticated) SMTP server connection.
10521057 * Default to false or fill an array :

Follow-up revisions

RevisionCommit summaryAuthorDate
r81886RELEASE-NOTES for r81868reedy12:48, 10 February 2011

Comments

#Comment by MaxSem (talk | contribs)   09:17, 10 February 2011

RELEASE-NOTES?

#Comment by Hashar (talk | contribs)   09:01, 11 February 2011
#Comment by 😂 (talk | contribs)   09:03, 11 February 2011
#Comment by Hashar (talk | contribs)   21:41, 11 February 2011

Will try to remember about it. Thx

Status & tagging log