NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

ldap-sync: Fix template selection

986b0afb
FreddleSpl0it <[email protected]> 1 year, 4 months ago
data/conf/phpfpm/crons/ldap-sync.php | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Diff

diff --git a/data/conf/phpfpm/crons/ldap-sync.php b/data/conf/phpfpm/crons/ldap-sync.php
index 648f46c9..66b76e64 100644
--- a/data/conf/phpfpm/crons/ldap-sync.php
+++ b/data/conf/phpfpm/crons/ldap-sync.php
@@ -123,8 +123,6 @@ $response = $ldap_query->where($iam_settings['username_field'], "*")
 
 // Process the users
 foreach ($response as $user) {
-  $mailcow_template = $user[$iam_settings['attribute_field']][0];
-
   // try get mailbox user
   $stmt = $pdo->prepare("SELECT
     mailbox.*,
@@ -137,7 +135,7 @@ foreach ($response as $user) {
   $row = $stmt->fetch(PDO::FETCH_ASSOC);
 
   // check if matching attribute mapping exists
-  $user_template = $user_res[$iam_settings['attribute_field']][0];
+  $user_template = $user[$iam_settings['attribute_field']][0];
   $mapper_key = array_search($user_template, $iam_settings['mappers']);
 
   if (empty($user[$iam_settings['username_field']][0])){