diff --git a/plugins/ldap-contacts-suggestions/LdapContactsSuggestions.php b/plugins/ldap-contacts-suggestions/LdapContactsSuggestions.php index c0a21f925..9e6bd29d2 100644 --- a/plugins/ldap-contacts-suggestions/LdapContactsSuggestions.php +++ b/plugins/ldap-contacts-suggestions/LdapContactsSuggestions.php @@ -45,7 +45,7 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges /** * @var string */ - private $sNameField = 'givenname'; + private $sNameField = 'givenName'; /** * @var string @@ -141,6 +141,7 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges { foreach ($aEmailFields as $sField) { + $sField = \strtolower($sField); if (!empty($aLdapItem[$sField][0])) { $sEmail = \trim($aLdapItem[$sField][0]); @@ -153,6 +154,7 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges foreach ($aNameFields as $sField) { + $sField = \strtolower($sField); if (!empty($aLdapItem[$sField][0])) { $sName = \trim($aLdapItem[$sField][0]); @@ -165,6 +167,7 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges foreach ($aUidFields as $sField) { + $sField = \strtolower($sField); if (!empty($aLdapItem[$sField][0])) { $sUid = \trim($aLdapItem[$sField][0]); diff --git a/plugins/ldap-contacts-suggestions/index.php b/plugins/ldap-contacts-suggestions/index.php index 8b1178098..253128158 100644 --- a/plugins/ldap-contacts-suggestions/index.php +++ b/plugins/ldap-contacts-suggestions/index.php @@ -95,7 +95,7 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin \RainLoop\Plugins\Property::NewInstance('search_field')->SetLabel('Search field') ->SetDefaultValue('uid'), \RainLoop\Plugins\Property::NewInstance('name_field')->SetLabel('Name field') - ->SetDefaultValue('givenname'), + ->SetDefaultValue('givenName'), \RainLoop\Plugins\Property::NewInstance('mail_field')->SetLabel('Mail field') ->SetDefaultValue('mail'), \RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')