diff options
author | Daniel Lange <DLange@git.local> | 2016-03-11 14:27:41 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-03-11 14:47:13 +0100 |
commit | df8303b04c7c7c72d28c842fc277970a977f11fb (patch) | |
tree | 3ea4629feb64229cee34ff8fae6b4bbbd9215eae | |
parent | f4b698433e902af3183deca7dc1879801cf5853e (diff) | |
download | drupal_htpasswdsync-df8303b04c7c7c72d28c842fc277970a977f11fb.tar.gz drupal_htpasswdsync-df8303b04c7c7c72d28c842fc277970a977f11fb.tar.bz2 drupal_htpasswdsync-df8303b04c7c7c72d28c842fc277970a977f11fb.zip |
Add @ and . to allowed usernames, https://www.drupal.org/node/1559600, thanks Justin Morant (1point21)
-rw-r--r-- | HTPasswdSync.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module index ac287da..791029b 100644 --- a/HTPasswdSync.module +++ b/HTPasswdSync.module @@ -92,7 +92,7 @@ function _htpasswdsync_email_domain() { * @return string */ function _htpasswdsync_sanatize_name($name) { - $name = trim(preg_replace('/[^\w\s]/i', '', $name), " \t\n\r"); + $name = trim(preg_replace('/[^\w\s@\.]/i', '', $name), " \t\n\r"); if(_htpasswdsync_names_without_whitespace()) $name = str_replace(' ','', $name); if(_htpasswdsync_names_lowercase()) $name = strtolower($name); return $name; |