From 16ba791902fa5de2048a5fb36c0ce7ca40debe82 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 5 Nov 2024 09:48:38 +0100 Subject: [PATCH] * Addressbook: show username for accounts as a column in the list too --- addressbook/templates/default/index.xet | 3 +++ api/src/Contacts/Ldap.php | 2 ++ api/src/Contacts/Sql.php | 1 + 3 files changed, 6 insertions(+) diff --git a/addressbook/templates/default/index.xet b/addressbook/templates/default/index.xet index b418f374e6..abe112860d 100644 --- a/addressbook/templates/default/index.xet +++ b/addressbook/templates/default/index.xet @@ -23,6 +23,7 @@ + @@ -99,6 +100,7 @@ + @@ -171,6 +173,7 @@ + diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index 7914f20579..72939dea15 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -134,6 +134,7 @@ class Ldap var $schema2egw = array( 'posixaccount' => array( 'account_id' => 'uidnumber', + 'account_lid' => 'uid', 'shadowexpire', ), 'inetorgperson' => array( @@ -199,6 +200,7 @@ class Ldap 'pubkey' => 'usersmimecertificate', 'uid' => 'objectguid', 'id' => 'objectguid', + 'account_lid' => 'samaccountname', ], #displayName #mozillaCustom1 diff --git a/api/src/Contacts/Sql.php b/api/src/Contacts/Sql.php index 554e34057a..46cdd55109 100644 --- a/api/src/Contacts/Sql.php +++ b/api/src/Contacts/Sql.php @@ -607,6 +607,7 @@ class Sql extends Api\Storage strpos($join,$GLOBALS['egw']->accounts->backend->table) === false && !array_key_exists('account_id',$filter)) { $join .= self::ACCOUNT_ACTIVE_JOIN; + $extra_cols[] = 'account_lid AS account_lid'; if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts'] === '0') { $filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER);