diff options
author | m.fu <m_fu@310415.no-reply.drupal.org> | 2009-03-24 23:37:12 +0000 |
---|---|---|
committer | m.fu <m_fu@310415.no-reply.drupal.org> | 2009-03-24 23:37:12 +0000 |
commit | 7473e9250a20983393201ec6fc7dbb476fa367a7 (patch) | |
tree | f98ead75f1fd0c7a66555b567d7d58d50642dd45 | |
parent | 783a3030021311ea519d11be3a7ee9b4d3692029 (diff) | |
download | drupal_htpasswdsync-7473e9250a20983393201ec6fc7dbb476fa367a7.tar.gz drupal_htpasswdsync-7473e9250a20983393201ec6fc7dbb476fa367a7.tar.bz2 drupal_htpasswdsync-7473e9250a20983393201ec6fc7dbb476fa367a7.zip |
Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file
-rw-r--r-- | HTPasswdSync.module | 12 | ||||
-rw-r--r-- | README.txt | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module index 2e1ed9d..6efbe76 100644 --- a/HTPasswdSync.module +++ b/HTPasswdSync.module @@ -1,4 +1,4 @@ -<?php +?php // $Id$ /* @file @@ -58,14 +58,11 @@ function _htpasswdsync_read_htfile(&$arr, $file) { $f = fopen($file, "r"); while ($l = fgets($f)) { - // _htpasswdsync_log("###########" . $l . "\n"); list($u, $p) = split(":", rtrim($l), 2); - // _htpasswdsync_log("###########" . $u . "__" . $p . "\n"); if ($u != "") { $arr[$u] = $p; } } - // _htpasswdsync_log("rrr\n" . print_r($arr, true) . "rrr\n"); fclose($f); } @@ -116,13 +113,10 @@ // add members to the group $res = db_query('SELECT name FROM {users} u, {users_roles} ur WHERE ur.rid = %d AND ur.uid = u.uid', $rid); while ($r = db_fetch_object($res)) { - $groups[$name] .= $r->name .", "; + $groups[$name] .= " ". $r->name; } - // get rid of tailing characters - $groups[$name] = rtrim($groups[$name], ", "); - } - _htpasswdsync_write_htfile($groups, $file); + } _htpasswdsync_write_htfile($groups, $file); } /* generate the htpasswd content from the database @@ -11,6 +11,8 @@ For a full description of the module, visit the project page: To submit bug reports and feature suggestions, or to track changes: http://drupal.org/project/issues/htpasswdsync +The way password are encrypted it only compatible with *nix version of Apache. + -- REQUIREMENTS -- |