aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-03-11 14:27:41 +0100
committerDaniel Lange <DLange@git.local>2016-03-11 14:47:13 +0100
commitdf8303b04c7c7c72d28c842fc277970a977f11fb (patch)
tree3ea4629feb64229cee34ff8fae6b4bbbd9215eae
parentf4b698433e902af3183deca7dc1879801cf5853e (diff)
downloaddrupal_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.module2
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy