* Addressbook: show username for accounts as a column in the list too

This commit is contained in:
ralf 2024-11-05 09:48:38 +01:00
parent 3fabd1f2cb
commit 16ba791902
3 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,7 @@
<column width="50"/> <column width="50"/>
<column width="80" disabled="@no_event_column"/> <column width="80" disabled="@no_event_column"/>
<column width="120"/> <column width="120"/>
<column width="120"/>
</columns> </columns>
<rows> <rows>
<row class="th"> <row class="th">
@ -99,6 +100,7 @@
<nextmatch-sortheader label="Created" id="contact_created" sortmode="DESC"/> <nextmatch-sortheader label="Created" id="contact_created" sortmode="DESC"/>
<nextmatch-sortheader label="Last modified" id="contact_modified" sortmode="DESC"/> <nextmatch-sortheader label="Last modified" id="contact_modified" sortmode="DESC"/>
</et2-vbox> </et2-vbox>
<nextmatch-sortheader label="Username" id="account_lid" sortmode="ASC"/>
</row> </row>
<row class="$row_cont[class] $row_cont[cat_id]" valign="top"> <row class="$row_cont[class] $row_cont[cat_id]" valign="top">
<et2-image align="center" label="$row_cont[type_label]" src="$row_cont[type]" noLang="1" style="font-size: 22px"/> <et2-image align="center" label="$row_cont[type_label]" src="$row_cont[type]" noLang="1" style="font-size: 22px"/>
@ -171,6 +173,7 @@
<et2-date-time id="${row}[modified]" readonly="true" class="noBreak"></et2-date-time> <et2-date-time id="${row}[modified]" readonly="true" class="noBreak"></et2-date-time>
<et2-select-account id="${row}[modifier]" readonly="true"></et2-select-account> <et2-select-account id="${row}[modifier]" readonly="true"></et2-select-account>
</et2-vbox> </et2-vbox>
<et2-description id="${row}[account_lid]"></et2-description>
</row> </row>
</rows> </rows>
</grid> </grid>

View File

@ -134,6 +134,7 @@ class Ldap
var $schema2egw = array( var $schema2egw = array(
'posixaccount' => array( 'posixaccount' => array(
'account_id' => 'uidnumber', 'account_id' => 'uidnumber',
'account_lid' => 'uid',
'shadowexpire', 'shadowexpire',
), ),
'inetorgperson' => array( 'inetorgperson' => array(
@ -199,6 +200,7 @@ class Ldap
'pubkey' => 'usersmimecertificate', 'pubkey' => 'usersmimecertificate',
'uid' => 'objectguid', 'uid' => 'objectguid',
'id' => 'objectguid', 'id' => 'objectguid',
'account_lid' => 'samaccountname',
], ],
#displayName #displayName
#mozillaCustom1 #mozillaCustom1

View File

@ -607,6 +607,7 @@ class Sql extends Api\Storage
strpos($join,$GLOBALS['egw']->accounts->backend->table) === false && !array_key_exists('account_id',$filter)) strpos($join,$GLOBALS['egw']->accounts->backend->table) === false && !array_key_exists('account_id',$filter))
{ {
$join .= self::ACCOUNT_ACTIVE_JOIN; $join .= self::ACCOUNT_ACTIVE_JOIN;
$extra_cols[] = 'account_lid AS account_lid';
if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts'] === '0') if ($GLOBALS['egw_info']['user']['preferences']['addressbook']['hide_accounts'] === '0')
{ {
$filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER); $filter[] = str_replace('UNIX_TIMESTAMP(NOW())',time(),self::ACOUNT_ACTIVE_FILTER);