add wgPasswordSalt option, set to false for compatibility with old passwords in user...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 8 Aug 2003 03:10:55 +0000 (03:10 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 8 Aug 2003 03:10:55 +0000 (03:10 +0000)
includes/DefaultSettings.php
includes/User.php

index f5dc756..98fcbde 100644 (file)
@@ -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.
 #
index 4e38f7d..8306392 100644 (file)
@@ -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 )