diff --git a/addressbook/inc/class.addressbook_ads.inc.php b/addressbook/inc/class.addressbook_ads.inc.php index 333a712f47..f9ae7ec57c 100644 --- a/addressbook/inc/class.addressbook_ads.inc.php +++ b/addressbook/inc/class.addressbook_ads.inc.php @@ -108,15 +108,13 @@ class addressbook_ads extends addressbook_ldap // AD seems to use user, instead of inetOrgPerson unset($this->schema2egw['posixaccount']); - $this->schema2egw['user'] = $this->schema2egw['inetorgperson']; - $this->schema2egw['user'] += array( + $this->schema2egw['user'] = array_merge($this->schema2egw['inetorgperson'], array( 'account_id' => 'objectsid', - 'account_lid' => 'samaccountname', - 'contact_uid' => 'objectguid', + 'id' => 'objectguid', + 'uid' => 'objectguid', + 'n_fn' => 'displayname', // leave CN used in DN untouched 'accountexpires', 'useraccountcontrol', // needed to exclude deactivated or expired accounts - ); - $this->schema2egw['user']['n_fn'] = 'displayname'; // leave CN used in DN untouched - + )); foreach($this->schema2egw as $schema => $attributes) { $this->all_attributes = array_merge($this->all_attributes,array_values($attributes)); @@ -189,7 +187,7 @@ class addressbook_ads extends addressbook_ldap function _user2egw(&$contact, $data) { $contact['account_id'] = $this->accounts_ads->objectsid2account_id($data['objectsid']); - $contact['id'] = $contact['contact_uid'] = $this->accounts_ads->objectguid2str($data['objectguid']); + $contact['id'] = $contact['uid'] = $this->accounts_ads->objectguid2str($data['objectguid']); // ignore system accounts if ($contact['account_id'] < accounts_ads::MIN_ACCOUNT_ID) return false; diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 5946c63eea..e53a089fac 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -74,8 +74,8 @@ class addressbook_groupdav extends groupdav_handler // since 1.9.007 we allow clients to specify the URL when creating a new contact, as specified by CardDAV // LDAP does NOT have a carddav_name attribute --> stick with id mapped to LDAP attribute uid if (version_compare($GLOBALS['egw_info']['apps']['phpgwapi']['version'], '1.9.007', '<') || - $this->bo->contact_repository == 'ldap' || - $this->bo->account_repository == 'ldap' && strpos($_SERVER['REQUEST_URI'].'/','/addressbook-accounts/') !== false) + $this->bo->contact_repository != 'sql' || + $this->bo->account_repository != 'sql' && strpos($_SERVER['REQUEST_URI'].'/','/addressbook-accounts/') !== false) { groupdav_handler::$path_extension = '.vcf'; }