mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-06 21:24:12 +08:00
[ldap-contacts-suggestions] Fix allowed emails
The configuration interface allows a list of allowed emails to be set, but the configuration parameter is never used.
This commit is contained in:
parent
05af650a29
commit
c23eeb54be
2 changed files with 4 additions and 13 deletions
|
@ -66,10 +66,11 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges
|
|||
* @param string $sObjectClass
|
||||
* @param string $sNameField
|
||||
* @param string $sEmailField
|
||||
* @param string $sAllowedEmails
|
||||
*
|
||||
* @return \LdapContactsSuggestions
|
||||
*/
|
||||
public function SetConfig($sHostName, $iHostPort, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sUidField, $sNameField, $sEmailField)
|
||||
public function SetConfig($sHostName, $iHostPort, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sUidField, $sNameField, $sEmailField, $sAllowedEmails)
|
||||
{
|
||||
$this->sHostName = $sHostName;
|
||||
$this->iHostPort = $iHostPort;
|
||||
|
@ -83,17 +84,6 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges
|
|||
$this->sUidField = $sUidField;
|
||||
$this->sNameField = $sNameField;
|
||||
$this->sEmailField = $sEmailField;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sAllowedEmails
|
||||
*
|
||||
* @return \LdapContactsSuggestions
|
||||
*/
|
||||
public function SetAllowedEmails($sAllowedEmails)
|
||||
{
|
||||
$this->sAllowedEmails = $sAllowedEmails;
|
||||
|
||||
return $this;
|
||||
|
|
|
@ -50,13 +50,14 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
$sSearchField = \trim($this->Config()->Get('plugin', 'search_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', ''));
|
||||
|
||||
if (0 < \strlen($sUsersDn) && 0 < \strlen($sObjectClass) && 0 < \strlen($sEmailField))
|
||||
{
|
||||
include_once __DIR__.'/LdapContactsSuggestions.php';
|
||||
|
||||
$oProvider = new LdapContactsSuggestions();
|
||||
$oProvider->SetConfig($sHostName, $iHostPort, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sSearchField, $sNameField, $sEmailField);
|
||||
$oProvider->SetConfig($sHostName, $iHostPort, $sAccessDn, $sAccessPassword, $sUsersDn, $sObjectClass, $sSearchField, $sNameField, $sEmailField, $sAllowedEmails);
|
||||
|
||||
$mResult[] = $oProvider;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue