Re-add wfEncryptPassword() (removed in r35923 in favor of User::crypt() and User...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 11 Jun 2008 22:20:26 +0000 (22:20 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 11 Jun 2008 22:20:26 +0000 (22:20 +0000)
includes/GlobalFunctions.php

index 5069212..c9e186a 100644 (file)
@@ -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
  */