Export TheGeek wrote:
well.. I forgot my password for sysop so I created a new md5 based off a new password and entered the md5 value into user_password in the user table on the wiki mysql database, but attempting to login still yeilds invalid password.. anybody have any thoughts on how to enter a new md5 and have it work? did i miss some sort of has / calculation done to the initial plaintext password?
/** * Salt a password. * Will only be salted if $wgPasswordSalt is true * @param string Password. * @return string Salted password or clear password. */ function addSalt( $p ) { global $wgPasswordSalt; if($wgPasswordSalt) return md5( "{$this->mId}-{$p}" ); else return $p; }
/** * Encrypt a password. * It can eventuall salt a password @see User::addSalt() * @param string $p clear Password. * @param string Encrypted password. */ function encryptPassword( $p ) { return $this->addSalt( md5( $p ) ); }
-- brion vibber (brion @ pobox.com)