diff --git a/plugins/ldap-contacts-suggestions/index.php b/plugins/ldap-contacts-suggestions/index.php index 253128158..15bdcaf2c 100644 --- a/plugins/ldap-contacts-suggestions/index.php +++ b/plugins/ldap-contacts-suggestions/index.php @@ -48,7 +48,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin $sAccessPassword = \trim($this->Config()->Get('plugin', 'access_password', '')); $sUsersDn = \trim($this->Config()->Get('plugin', 'users_dn_format', '')); $sObjectClass = \trim($this->Config()->Get('plugin', 'object_class', '')); - $sSearchField = \trim($this->Config()->Get('plugin', 'search_field', '')); + $sUidField = \trim($this->Config()->Get('plugin', 'uid_field', '')); $sNameField = \trim($this->Config()->Get('plugin', 'name_field', '')); $sEmailField = \trim($this->Config()->Get('plugin', 'mail_field', '')); $sAllowedEmails = \trim($this->Config()->Get('plugin', 'allowed_emails', '')); @@ -58,7 +58,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin include_once __DIR__.'/LdapContactsSuggestions.php'; $oProvider = new LdapContactsSuggestions(); - $oProvider->SetConfig($sHostName, $iHostPort, $bUseStartTLS, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sSearchField, $sNameField, $sEmailField, $sAllowedEmails); + $oProvider->SetConfig($sHostName, $iHostPort, $bUseStartTLS, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sUidField, $sNameField, $sEmailField, $sAllowedEmails); $mResult[] = $oProvider; } @@ -81,25 +81,28 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin \RainLoop\Plugins\Property::NewInstance('use_start_tls')->SetLabel('Use StartTLS') ->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL) ->SetDefaultValue(True), - \RainLoop\Plugins\Property::NewInstance('access_dn')->SetLabel('Access dn (login)') - ->SetDescription('LDAP bind DN to authentifcate with. If left blank, anonymous bind will be tried and Access password will be ignored') + \RainLoop\Plugins\Property::NewInstance('access_dn')->SetLabel('Bind DN') + ->SetDescription('DN to bind (login) with. If left blank, anonymous bind will be tried and the password will be ignored') ->SetDefaultValue(''), - \RainLoop\Plugins\Property::NewInstance('access_password')->SetLabel('Access password') + \RainLoop\Plugins\Property::NewInstance('access_password')->SetLabel('Bind password') ->SetType(\RainLoop\Enumerations\PluginPropertyType::PASSWORD) ->SetDefaultValue(''), - \RainLoop\Plugins\Property::NewInstance('users_dn_format')->SetLabel('Users DN format') - ->SetDescription('LDAP users dn format. Supported tokens: {email}, {login}, {domain}, {domain:dc}, {imap:login}, {imap:host}, {imap:port}') + \RainLoop\Plugins\Property::NewInstance('users_dn_format')->SetLabel('Search base DN') + ->SetDescription('DN to use as the search base. Supported tokens: {domain}, {domain:dc}, {email}, {email:user}, {email:domain}, {login}, {imap:login}, {imap:host}, {imap:port}') ->SetDefaultValue('ou=People,dc=domain,dc=com'), \RainLoop\Plugins\Property::NewInstance('object_class')->SetLabel('objectClass value') ->SetDefaultValue('inetOrgPerson'), - \RainLoop\Plugins\Property::NewInstance('search_field')->SetLabel('Search field') + \RainLoop\Plugins\Property::NewInstance('uid_field')->SetLabel('uid attributes') + ->SetDescription('LDAP attributes for userids, comma separated list in order of preference') ->SetDefaultValue('uid'), - \RainLoop\Plugins\Property::NewInstance('name_field')->SetLabel('Name field') + \RainLoop\Plugins\Property::NewInstance('name_field')->SetLabel('Name attributes') + ->SetDescription('LDAP attributes for user names, comma separated list in order of preference') ->SetDefaultValue('givenName'), - \RainLoop\Plugins\Property::NewInstance('mail_field')->SetLabel('Mail field') + \RainLoop\Plugins\Property::NewInstance('mail_field')->SetLabel('Mail attributes') + ->SetDescription('LDAP attributes for user email addresses, comma separated list in order of preference') ->SetDefaultValue('mail'), \RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails') - ->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net') + ->SetDescription('Email addresses of users which should be allowed to do LDAP lookups, space as delimiter, wildcard supported. Example: user1@domain1.net user2@domain1.net *@domain2.net') ->SetDefaultValue('*') ); }