Exclude @ from generated passwords
-
I noticed my email client turned WP-generated passwords into email links, because they contained a ‘@’ symbol. That’s annoying.
Is there a way to exclude ‘@’ from password generation?
I see the function is here:
function wp_generate_password($length = 12, $special_chars = true) { $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; if ( $special_chars ) $chars .= '!@#$%^&*()'; $password = ''; for ( $i = 0; $i < $length; $i++ ) $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1); return $password; }
So can you turn off the special_chars somewhere in an admin area? Or could I turn ‘true’ to ‘false’?
I’ll remove the @ anyway…
- The topic ‘Exclude @ from generated passwords’ is closed to new replies.