From: Roan Kattouw Date: Wed, 11 Jun 2008 22:20:26 +0000 (+0000) Subject: Re-add wfEncryptPassword() (removed in r35923 in favor of User::crypt() and User... X-Git-Tag: 1.31.0-rc.0~47039 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=140ff5b2fc85c8b84f4fdf9b78d17d9240df78ef;p=lhc%2Fweb%2Fwiklou.git Re-add wfEncryptPassword() (removed in r35923 in favor of User::crypt() and User::oldCrypt()) for extension compatibility, so old extensions don't go around and throw fatal errors all over the place. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5069212efe..c9e186ab20 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1801,6 +1801,20 @@ function wfPercent( $nr, $acc = 2, $round = true ) { return $round ? round( $ret, $acc ) . '%' : "$ret%"; } +/** + * Encrypt a username/password. + * + * @param string $userid ID of the user + * @param string $password Password of the user + * @return string Hashed password + * @deprecated Use User::crypt() or User::oldCrypt() instead + */ +function wfEncryptPassword( $userid, $password ) { + wfDeprecated(__FUNCTION__); + # Just wrap around User::oldCrypt() + return User::oldCrypt($password, $userid); +} + /** * Appends to second array if $value differs from that in $default */