From: Brion Vibber Date: Fri, 8 Aug 2003 03:10:55 +0000 (+0000) Subject: add wgPasswordSalt option, set to false for compatibility with old passwords in user... X-Git-Tag: 1.1.0~355 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=f6b6931ff40253fb2ab6899cc1a159b888cd017e;p=lhc%2Fweb%2Fwiklou.git add wgPasswordSalt option, set to false for compatibility with old passwords in user table --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f5dc756f2b..98fcbde194 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -121,6 +121,8 @@ $wgProfiling = false; # Enable for more detailed by-function times in debug log # Requires zlib support enabled in PHP. $wgUseGzip = false; +$wgPasswordSalt = true; # For compatibility with old installations set to false + # Which namespaces should support subpages? # See Language.php for a list of namespaces. # diff --git a/includes/User.php b/includes/User.php index 4e38f7de9e..8306392a71 100644 --- a/includes/User.php +++ b/includes/User.php @@ -282,7 +282,11 @@ class User { function addSalt( $p ) { - return md5( "{$this->mId}-{$p}" ); + global $wgPasswordSalt; + if($wgPasswordSalt) + return md5( "{$this->mId}-{$p}" ); + else + return $p; } function encryptPassword( $p )