aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-03-11 14:31:26 +0100
committerDaniel Lange <DLange@git.local>2016-03-11 14:47:28 +0100
commit7be7fcc52771e7e504c5a896a7f6cb4b630a4f23 (patch)
tree080d9c31f3640693c60ec81592c37f49e95ad359
parentdf8303b04c7c7c72d28c842fc277970a977f11fb (diff)
downloaddrupal_htpasswdsync-7be7fcc52771e7e504c5a896a7f6cb4b630a4f23.tar.gz
drupal_htpasswdsync-7be7fcc52771e7e504c5a896a7f6cb4b630a4f23.tar.bz2
drupal_htpasswdsync-7be7fcc52771e7e504c5a896a7f6cb4b630a4f23.zip
Fix typo'd "sanitize" in function name
-rw-r--r--HTPasswdSync.module16
1 files changed, 8 insertions, 8 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module
index 791029b..00fc9b7 100644
--- a/HTPasswdSync.module
+++ b/HTPasswdSync.module
@@ -85,13 +85,13 @@ function _htpasswdsync_email_domain() {
/**
- * Sanatizes the user name to be htpasswd conform. Removes ":" character as it
+ * Sanitizes the user name to be htpasswd conform. Removes ":" character as it
* may cause trouble in the files. All non-word characters are removed to
* be htpasswd/htgroup compliant.
* @param string $name
* @return string
*/
-function _htpasswdsync_sanatize_name($name) {
+function _htpasswdsync_sanitize_name($name) {
$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);
@@ -218,18 +218,18 @@ function _htpasswdsync_updategroup() {
}
foreach(_htpasswdsync_roles() as $rid) {
- $role = _htpasswdsync_sanatize_name(reset(db_query('SELECT name FROM {role} WHERE rid = :rid', array(':rid' => $rid))->fetchCol()));
+ $role = _htpasswdsync_sanitize_name(reset(db_query('SELECT name FROM {role} WHERE rid = :rid', array(':rid' => $rid))->fetchCol()));
if(!empty($role)) {
$users = db_query('SELECT u.name, u.mail FROM {users} AS u, {users_roles} AS ur WHERE ur.rid = :rid AND ur.uid = u.uid AND status = 1', array(':rid' => $rid));
$groups[$role] = array();
$group = &$groups[$role];
foreach($users as $user) {
- $group[] = _htpasswdsync_sanatize_name($user->name);
+ $group[] = _htpasswdsync_sanitize_name($user->name);
if($mail_domain != '') {
$user->mail = strtolower($user->mail);
if(strpos($user->mail, $mail_domain) !== false) {
$user->mail = reset(explode('@', $user->mail, 2));
- $group[] = _htpasswdsync_sanatize_name($user->mail);
+ $group[] = _htpasswdsync_sanitize_name($user->mail);
}
}
}
@@ -248,7 +248,7 @@ function _htpasswdsync_remove_role($role) {
if(is_numeric($role)) {
$role = reset(db_query('SELECT name FROM {role} WHERE rid = :rid', array(':rid' => $role))->fetchCol());
}
- $role = _htpasswdsync_sanatize_name($role);
+ $role = _htpasswdsync_sanitize_name($role);
$file = _htpasswdsync_grpfilename();
$groups = _htpasswdsync_read_htfile($file);
if(isset($groups[$role])) {
@@ -290,12 +290,12 @@ function _htpasswdsync_remove_role($role) {
if(isset($passwords[$r->username])) unset($passwords[$r->username]);
if(isset($passwords[$r->mail])) unset($passwords[$r->mail]);
} else {
- $passwords[_htpasswdsync_sanatize_name($r->username)] = $r->passwd;
+ $passwords[_htpasswdsync_sanitize_name($r->username)] = $r->passwd;
if($mail_domain != '') {
$r->mail = strtolower($r->mail);
if(strpos($r->mail, $mail_domain) !== false) {
$r->mail = reset(explode('@', $r->mail, 2));
- $passwords[_htpasswdsync_sanatize_name($r->mail)] = $r->passwd;
+ $passwords[_htpasswdsync_sanitize_name($r->mail)] = $r->passwd;
}
}

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