summaryrefslogtreecommitdiff
path: root/includes/User.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-04-07 04:34:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-04-07 04:34:31 +0200
commitacb4344b687e0ad771a90693ef4838d74799bca6 (patch)
treedd421c97252b1d0d17357513fb1e87f74ede78f7 /includes/User.php
parent68d8f40ee713b12fefce5dfb93f6843717ccc951 (diff)
parent03e45da6f96fd9aa411e015554f559b3ee9a61da (diff)
Merge branch 'master' into redesign
Diffstat (limited to 'includes/User.php')
-rw-r--r--includes/User.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/User.php b/includes/User.php
index cc861ad4..2ccc695b 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -2771,7 +2771,7 @@ class User {
return EDIT_TOKEN_SUFFIX;
} else {
if( !isset( $_SESSION['wsEditToken'] ) ) {
- $token = $this->generateToken();
+ $token = self::generateToken();
$_SESSION['wsEditToken'] = $token;
} else {
$token = $_SESSION['wsEditToken'];
@@ -2789,7 +2789,7 @@ class User {
* @param $salt \string Optional salt value
* @return \string The new random token
*/
- function generateToken( $salt = '' ) {
+ public static function generateToken( $salt = '' ) {
$token = dechex( mt_rand() ) . dechex( mt_rand() );
return md5( $token . $salt );
}
@@ -2884,7 +2884,7 @@ class User {
$now = time();
$expires = $now + 7 * 24 * 60 * 60;
$expiration = wfTimestamp( TS_MW, $expires );
- $token = $this->generateToken( $this->mId . $this->mEmail . $expires );
+ $token = self::generateToken( $this->mId . $this->mEmail . $expires );
$hash = md5( $token );
$this->load();
$this->mEmailToken = $hash;