From 39f0730434b7f8618a9e212527d3c520874faf9c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 3 Mar 2019 13:18:02 +0100 Subject: [PATCH] added mail alias to self service --- lam/HISTORY | 2 +- lam/lib/modules/windowsUser.inc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lam/HISTORY b/lam/HISTORY index bfb877d1..002ffc9a 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -6,7 +6,7 @@ March 2019 -> New self service fields: Mail routing (Local address) and Windows (Proxy-Addresses) -> Bind DLZ: support DNAME+XFR records and descriptions in records (requires latest LDAP schema) -> Cron jobs: added Shadow account expiration notification jobs - -> New self service fields: Shadow account expiration date, mail routing address + -> New self service fields: Shadow account expiration date, mail routing address, Windows mail alias - Fixed bugs: -> Allow tree-only configurations without any other tab diff --git a/lam/lib/modules/windowsUser.inc b/lam/lib/modules/windowsUser.inc index 434598a8..2dfc18fa 100644 --- a/lam/lib/modules/windowsUser.inc +++ b/lam/lib/modules/windowsUser.inc @@ -953,6 +953,7 @@ class windowsUser extends baseModule implements passwordService { 'department' => _('Department'), 'departmentNumber' => _('Department number'), 'proxyAddresses' => _('Proxy-Addresses (read-only)'), + 'otherMailbox' => _('Email alias (read-only)'), ); // possible self service read-only fields $return['selfServiceReadOnlyFields'] = array('physicalDeliveryOfficeName', 'telephoneNumber', @@ -2936,6 +2937,17 @@ class windowsUser extends baseModule implements passwordService { $row->addField(new htmlOutputText(implode('
', $proxyAddresses), false)); $return['proxyAddresses'] = $row; } + if (in_array('otherMailbox', $fields)) { + $otherMailbox = array(); + if (isset($attributes['otherMailbox'])) { + $otherMailbox = $attributes['otherMailbox']; + } + array_map('htmlspecialchars', $otherMailbox); + $row = new htmlResponsiveRow(); + $row->addLabel(new htmlOutputText($this->getSelfServiceLabel('otherMailbox', _('Email alias')))); + $row->addField(new htmlOutputText(implode('
', $otherMailbox), false)); + $return['otherMailbox'] = $row; + } return $return; }