aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm.fu <m_fu@310415.no-reply.drupal.org>2009-11-03 23:08:53 +0000
committerm.fu <m_fu@310415.no-reply.drupal.org>2009-11-03 23:08:53 +0000
commitb23559224cef22053cfc3b63a65bfeb1296a8eb7 (patch)
tree5f2a1c6953f0999940d073c3c60bfc49881cb6e1
parent993841af60d94ade489fa92cf069730de058d2ca (diff)
downloaddrupal_htpasswdsync-b23559224cef22053cfc3b63a65bfeb1296a8eb7.tar.gz
drupal_htpasswdsync-b23559224cef22053cfc3b63a65bfeb1296a8eb7.tar.bz2
drupal_htpasswdsync-b23559224cef22053cfc3b63a65bfeb1296a8eb7.zip
Fixed #588208 by ikogan : fixed the colon detection
Fixed #611020 by fasdalf@fasdalf.ru : group file not updated when adding user
-rw-r--r--CHANGELOG.txt3
-rw-r--r--HTPasswdSync.module20
2 files changed, 20 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8ae0a91..957d342 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,9 @@ $Id$
Fixed #588208 by ikogan : username shall not contain colon
+v1.4 bug fix release
+Fixed #588208 by ikogan : fixed the colon detection
+Fixed #611020 by fasdalf@fasdalf.ru : group file not updated when adding user
v1.3 bug fix release
Fixed #588208 by ikogan : username with t are concidered invalid
diff --git a/HTPasswdSync.module b/HTPasswdSync.module
index cfb6b27..ae27095 100644
--- a/HTPasswdSync.module
+++ b/HTPasswdSync.module
@@ -2,6 +2,10 @@
// $Id$
/*
* $Log$
+ * Revision 1.1.2.7 2009/11/03 23:08:53 mfu
+ * Fixed #588208 by ikogan : fixed the colon detection
+ * Fixed #611020 by fasdalf@fasdalf.ru : group file not updated when adding user
+ *
* Revision 1.1.2.6 2009/10/19 21:50:42 mfu
* Fixed #588208 by ikogan : username shall not contain colon
*
@@ -194,7 +198,7 @@
* @return
*/
function _htpasswdsync_updategroup() {
-
+ firep("called _htpasswdsync_updategroup");
$file = _htpasswdsync_grpfilename();
$groups = array();
@@ -207,6 +211,8 @@
// get role name
$res = db_fetch_object(db_query('SELECT name FROM {role} WHERE rid = %d', $rid));
$name = $res->name;
+ firep($rid, "rid");
+ firep($res->name, "$res->name");
//empty group
$groups[$name] = "";
@@ -215,9 +221,13 @@
$res = db_query('SELECT name FROM {users} u, {users_roles} ur WHERE ur.rid = %d AND ur.uid = u.uid AND status = 1', $rid);
while ($r = db_fetch_object($res)) {
$groups[$name] .= " ". $r->name;
+ firep($r->name, "$r->name");
+ firep($groups, "$groups");
}
- } _htpasswdsync_write_htfile($groups, $file);
+ }
+ _htpasswdsync_write_htfile($groups, $file);
+ firep("end _htpasswdsync_updategroup");
}
/* generate the htpasswd content from the database
@@ -228,7 +238,7 @@
* @return
*/
function _htpasswdsync_updatepasswd() {
-
+ firep("called _htpasswdsync_updatepasswd");
$file = _htpasswdsync_passfilename();
$passwords = array();
@@ -247,6 +257,7 @@
}
}
_htpasswdsync_write_htfile($passwords, $file);
+ firep("end _htpasswdsync_updatepasswd");
}
@@ -387,6 +398,9 @@ function htpasswdsync_user($op, &$edit, &$account, $category = NULL) {
case "validate":
_htpasswdsync_validate($edit, $account);
break;
+ case "load":
+ _htpasswdsync_updategroup();
+ break;
}
} // function htpasswdsync_user()

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