Changeset 7796 for trunk/wp-includes/pluggable.php
- Timestamp:
- 04/24/2008 12:19:09 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/pluggable.php
r7747 r7796 1168 1168 * @return string The random password 1169 1169 **/ 1170 function wp_generate_password() { 1171 $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 1172 $length = 7; 1170 function wp_generate_password($length = 12) { 1171 $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()"; 1173 1172 $password = ''; 1174 1173 for ( $i = 0; $i < $length; $i++ ) 1175 $password .= substr($chars, mt_rand(0, 61), 1);1174 $password .= substr($chars, mt_rand(0, strlen($chars)), 1); 1176 1175 return $password; 1177 1176 }
Note: See TracChangeset
for help on using the changeset viewer.