Title: Exclude @ from generated passwords
Last modified: August 19, 2016

---

# Exclude @ from generated passwords

 *  [Modifiedcontent](https://wordpress.org/support/users/modifiedcontent/)
 * (@modifiedcontent)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/exclude-from-generated-password/)
 * 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.

## Tags

 * [generating](https://wordpress.org/support/topic-tag/generating/)
 * [passwords](https://wordpress.org/support/topic-tag/passwords/)

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 0 replies
 * 1 participant
 * Last reply from: [Modifiedcontent](https://wordpress.org/support/users/modifiedcontent/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/exclude-from-generated-password/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
