aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstfwi <cerberos@atwillys.de>2012-02-05 11:28:05 +0000
committerstfwi <cerberos@atwillys.de>2012-02-05 11:28:05 +0000
commit7f1ce5d46e0e230d378690cc876e2507d27164a9 (patch)
tree10d58c06e12e39f962ef20c34252c2063dd7929c
parent6868511ac9bcc6aaca5dfeb1f8b342082e9c0ad7 (diff)
downloaddrupal_htpasswdsync-7f1ce5d46e0e230d378690cc876e2507d27164a9.tar.gz
drupal_htpasswdsync-7f1ce5d46e0e230d378690cc876e2507d27164a9.tar.bz2
drupal_htpasswdsync-7f1ce5d46e0e230d378690cc876e2507d27164a9.zip
Fix [#1428874] using patch #1 by dchronos
-rw-r--r--HTPasswdSync.module12
1 files changed, 9 insertions, 3 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module
index e61334b..ac287da 100644
--- a/HTPasswdSync.module
+++ b/HTPasswdSync.module
@@ -135,13 +135,13 @@ function _htpasswdsync_check_file($path) {
return t("File '!file' does not exists and the parent directory does not exist neither. Please check the path you entered or create the file manually.", array('!file' => $path));
} else if(!is_writable(dirname($path))) {
return t("File '!file' does not exists and the parent directory is not writable. Please create the file manually.", array('!file' => $path));
- } else if(file_put_contents($path, '') === false || !is_file($path) || !is_writable($path) || !is_readable($path)) {
+ } else if(file_put_contents($path, '') === false || !is_file($path) || !is_writable($path) || !is_readable($path)) {
return t("File '!file' does not exists, and it could no be created properly. Please create the file manually.", array('!file' => $path));
}
return false;
} else if(!is_readable($path)) {
return t("File '!file' exists but is not readable for the server. Use chmod command to change this.", array('!file' => $path));
- } else if(!is_writable($path)) {
+ } else if(!is_writable($path)) {
return t("File '!file' exists but is not writable for the server. Use chmod command to change this.", array('!file' => $path));
} else {
return t("File '!file' (dead branch check): Please inform the maintainer that there is a bug in function _htpasswdsync_check_file().", array('!file' => $path));
@@ -403,6 +403,12 @@ function htpasswdsync_field_attach_submit($entity_type, $entity, $form, &$form_s
}
}
+/**
+ * Run the _htpasswdsync_update function when a user is create;
+ */
+function htpasswdsync_user_insert(){
+ _htpasswdsync_updatepasswd();
+}
/**
* Role delete hook
@@ -589,7 +595,7 @@ function htpasswdsync_admin_form_validate($form, &$form_state) {
form_set_error('htpasswdsync_htpasswd', 'The htgroup file and the htpasswd file have to be different files.');
$error = true;
}
-
+
$file = $form_state['values']['htpasswdsync_htpasswd'];
if(!empty($file)) {
if($msg = _htpasswdsync_check_file($file)) {

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