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.
This commit is contained in:
Aleksander Machniak 2018-08-03 09:29:50 +00:00
parent 5f594c46d4
commit 87abd0d2d4

View file

@ -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;