... | ... | @@ -38,3 +38,80 @@ The following questions follow: |
|
|
* In case it is optional? Should we enforce validity?
|
|
|
* Is there a standard GO-Schema file we can use?
|
|
|
* Should we develop our own and contribute it to GO?
|
|
|
|
|
|
Groupoffice ldap settings:
|
|
|
|
|
|
```php
|
|
|
$config['ldap_host']='localhost';
|
|
|
$config['ldap_port']='389';
|
|
|
$config['ldap_user']='admin';
|
|
|
$config['ldap_pass']='password is in keepass';
|
|
|
$config['ldap_basedn']='dc=osalliance,dc=com';
|
|
|
$config['ldap_peopledn']='ou=users,dc=osalliance,dc=com';
|
|
|
$config['ldap_groupsdn']='ou=groups,dc=osalliance,dc=com';
|
|
|
$config['ldap_tls']=false;
|
|
|
$config['ldap_auth_dont_update_profiles']=false; //set to true if you don't want ldap to overwrite the Group-Office user profile on each login
|
|
|
$config['ldap_use_uid_with_email_domain']='';//leave empty to use the default mapping. Set to a domain name to use username@example.com as e-mail address.
|
|
|
|
|
|
//Available since 4.2.17. Instruct the "serverclient" module to create mailboxes for these domains. The serverclient module must be configured. See [[Mailserver#Optionally_install_the_serverclient]].
|
|
|
//leave the imapauth.config.php empty in this case.
|
|
|
$config['ldap_create_mailbox_domains']=array("intermesh.dev");
|
|
|
```
|
|
|
|
|
|
mapping settings:
|
|
|
|
|
|
```php
|
|
|
<?php
|
|
|
$mapping=array(
|
|
|
'username' => 'uid',
|
|
|
'password' => 'userPassword',
|
|
|
'first_name' => 'cn',
|
|
|
'middle_name' => 'middleName',
|
|
|
'last_name' => 'sn',
|
|
|
'initials' => 'initials',
|
|
|
'title' => 'title',
|
|
|
'sex' => 'gender',
|
|
|
'birthday' => 'dateOfBirth',
|
|
|
'email' => 'mail',
|
|
|
'company' => 'o',
|
|
|
'department' => 'ou',
|
|
|
'function' => 'businessCategory',
|
|
|
'home_phone' => 'homePhone',
|
|
|
'work_phone' => 'workPhone',
|
|
|
'fax' => 'facsimileTelephoneNumber',
|
|
|
'cellular' => 'mobile',
|
|
|
'country' => 'c',
|
|
|
'state' => 'st',
|
|
|
'city' => 'l',
|
|
|
'zip' => 'postalCode',
|
|
|
'address' => 'postalAddress',
|
|
|
'homepage' => 'url',
|
|
|
'work_address' => 'addresses',
|
|
|
'work_zip' => 'location',
|
|
|
'work_country' => 'country',
|
|
|
'work_state' => 'region',
|
|
|
'work_city' => 'localityAddress',
|
|
|
'work_fax' => 'pager',
|
|
|
'currency' => 'destinationIndicator',
|
|
|
'max_rows_list' => 'primaryChallenges',
|
|
|
'timezone' => 'challenges',
|
|
|
'start_module' => 'firstChallenge',
|
|
|
'theme' => 'secondChallenge',
|
|
|
'language' => new \GO\Ldapauth\Mapping\Constant('en'),
|
|
|
'enabled' => new \GO\Ldapauth\Mapping\FunctionMapping('custom_ldap_mapping_function_enabled'),
|
|
|
'exclude' => new \GO\Ldapauth\Mapping\FunctionMapping('custom_ldap_mapping_function_exclude'),
|
|
|
);
|
|
|
|
|
|
if (!function_exists('custom_ldap_mapping_function_enabled')) {
|
|
|
function custom_ldap_mapping_function_enabled(\GO\Base\Ldap\Record $record){
|
|
|
return $record->{"SOME-LdapAttribute"}[0]=="TRUE" ? 1 : 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (!function_exists('custom_ldap_mapping_function_exclude')) {
|
|
|
function custom_ldap_mapping_function_exclude(\GO\Base\Ldap\Record $record){
|
|
|
return $record->{"SOME-LdapAttribute"}[0]=="TRUE" ? 1 : 0;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |