From 7bcca7c3bd5def17b55402eb20d8907097a1a3f8 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 9 Dec 2015 17:12:20 +0000 Subject: [PATCH] support for Windows --- lam/lib/modules/nisMailAlias.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lam/lib/modules/nisMailAlias.inc b/lam/lib/modules/nisMailAlias.inc index d9d3350d..0d7f6bc0 100644 --- a/lam/lib/modules/nisMailAlias.inc +++ b/lam/lib/modules/nisMailAlias.inc @@ -486,7 +486,15 @@ class nisMailAlias extends baseModule { if ($this->cachedMailList != null) { return $this->cachedMailList; } - $this->cachedMailList = searchLDAPByAttribute('mail', '*', 'inetOrgPerson', array('mail'), array('user')); + $objectClass = 'inetOrgPerson'; + $activeTypes = $_SESSION['config']->get_ActiveTypes(); + if (in_array('user', $activeTypes)) { + $userModules = $_SESSION['config']->get_AccountModules('user'); + if (in_array('windowsUser', $userModules)) { + $objectClass = 'user'; + } + } + $this->cachedMailList = searchLDAPByAttribute('mail', '*', $objectClass, array('mail'), array('user')); for ($i = 0; $i < sizeof($this->cachedMailList); $i++) { $this->cachedMailList[$i] = $this->cachedMailList[$i]['mail'][0]; }