summaryrefslogtreecommitdiffstats
path: root/wp-includes/pluggable.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-24 11:45:39 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-24 11:45:39 +0000
commitcf9f85dc8121a359d550ffa3b735fb48859eee88 (patch)
tree9f90be15fc46163f5656f019f2a2866414b7c9f2 /wp-includes/pluggable.php
parentf10f9f5b05e23ce4c07479b094bd3ff4bbfd86d0 (diff)
downloadwordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.gz
wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.xz
wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.zip
Merged with WP 2.5, revision 7806
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/pluggable.php')
-rw-r--r--wp-includes/pluggable.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php
index 4c457a9..4a35347 100644
--- a/wp-includes/pluggable.php
+++ b/wp-includes/pluggable.php
@@ -1078,11 +1078,7 @@ if ( !function_exists('wp_hash') ) :
function wp_hash($data) {
$salt = wp_salt();
- if ( function_exists('hash_hmac') ) {
- return hash_hmac('md5', $data, $salt);
- } else {
- return md5($data . $salt);
- }
+ return hash_hmac('md5', $data, $salt);
}
endif;
@@ -1174,12 +1170,11 @@ if ( !function_exists('wp_generate_password') ) :
*
* @return string The random password
**/
-function wp_generate_password() {
- $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- $length = 7;
+function wp_generate_password($length = 12) {
+ $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";
$password = '';
for ( $i = 0; $i < $length; $i++ )
- $password .= substr($chars, mt_rand(0, 61), 1);
+ $password .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);
return $password;
}
endif;
@@ -1336,7 +1331,7 @@ if ( !function_exists('wp_login') ) :
* global for why there was a failure can utilize it later.
*
* @since 1.2.2
- * @deprecated Use wp_signin()
+ * @deprecated Use wp_signon()
* @global string $error Error when false is returned
*
* @param string $username User's username