Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2019-06-30 09:37:49 +0300
committerAleksander Machniak <alec@alec.pl>2019-06-30 09:37:49 +0300
commit9d5e2219f816a393d1a7e445e7fa0878da7c5d37 (patch)
treeb404ca6dfa61f6cb241d89512a1a1438a78fc90a /plugins
parent4e9aca2f27d28a43b38f3d81aa1b5cf8dee91158 (diff)
Make ldap_ppolicy to log debug into 'ldap.log' file
Diffstat (limited to 'plugins')
-rw-r--r--plugins/password/drivers/ldap_ppolicy.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/password/drivers/ldap_ppolicy.php b/plugins/password/drivers/ldap_ppolicy.php
index ddbf53535..8a7b4d5cb 100644
--- a/plugins/password/drivers/ldap_ppolicy.php
+++ b/plugins/password/drivers/ldap_ppolicy.php
@@ -43,7 +43,15 @@ class rcube_ldap_ppolicy_password
);
$cmd = 'plugins/password/helpers/'. $cmd;
- $this->_debug("parameters:\ncmd:$cmd\nuri:$uri\nbaseDN:$baseDN\nfilter:$filter");
+
+ $this->_debug('Policy request: ' . json_encode(array(
+ 'user' => $username,
+ 'cmd' => $cmd,
+ 'uri' => $uri,
+ 'baseDN' => $baseDN,
+ 'filter' => $filter,
+ )));
+
$process = proc_open($cmd, $descriptorspec, $pipes);
if (is_resource($process)) {
@@ -66,7 +74,7 @@ class rcube_ldap_ppolicy_password
$result = stream_get_contents($pipes[1]);
fclose($pipes[1]);
- $this->_debug('Result:'.$result);
+ $this->_debug('Policy result: ' . $result);
switch ($result) {
case "OK":
@@ -91,7 +99,7 @@ class rcube_ldap_ppolicy_password
private function _debug($str)
{
if ($this->debug) {
- rcube::write_log('password_ldap_ppolicy', $str);
+ rcube::write_log('ldap', $str);
}
}
}