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);