From 87abd0d2d45c00fd4951fc9bc0273e318536ba37 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 3 Aug 2018 09:29:50 +0000 Subject: [PATCH] Fix per_user_logging with syncroton In syncroton the log_dir is already set and verified by syncroton itself, so kolab_auth would skip some log entries thinking user-dir does not exist. --- plugins/kolab_auth/kolab_auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php index 73aff848..91d1c751 100644 --- a/plugins/kolab_auth/kolab_auth.php +++ b/plugins/kolab_auth/kolab_auth.php @@ -366,7 +366,9 @@ class kolab_auth extends rcube_plugin } } // Define the user log directory if a username is provided - else if ($rcmail->config->get('per_user_logging') && !empty($this->username)) { + else if ($rcmail->config->get('per_user_logging') && !empty($this->username) + && !stripos($log_dir, '/' . $this->username) // maybe already set by syncroton, skip + ) { $user_log_dir = $log_dir . '/' . strtolower($this->username); if (is_writable($user_log_dir)) { $args['dir'] = $user_log_dir;