mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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 $sObjectClass
|
||||||
* @param string $sNameField
|
* @param string $sNameField
|
||||||
* @param string $sEmailField
|
* @param string $sEmailField
|
||||||
|
* @param string $sAllowedEmails
|
||||||
*
|
*
|
||||||
* @return \LdapContactsSuggestions
|
* @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->sHostName = $sHostName;
|
||||||
$this->iHostPort = $iHostPort;
|
$this->iHostPort = $iHostPort;
|
||||||
|
|
@ -83,17 +84,6 @@ class LdapContactsSuggestions implements \RainLoop\Providers\Suggestions\ISugges
|
||||||
$this->sUidField = $sUidField;
|
$this->sUidField = $sUidField;
|
||||||
$this->sNameField = $sNameField;
|
$this->sNameField = $sNameField;
|
||||||
$this->sEmailField = $sEmailField;
|
$this->sEmailField = $sEmailField;
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param string $sAllowedEmails
|
|
||||||
*
|
|
||||||
* @return \LdapContactsSuggestions
|
|
||||||
*/
|
|
||||||
public function SetAllowedEmails($sAllowedEmails)
|
|
||||||
{
|
|
||||||
$this->sAllowedEmails = $sAllowedEmails;
|
$this->sAllowedEmails = $sAllowedEmails;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
||||||
|
|
@ -50,13 +50,14 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
$sSearchField = \trim($this->Config()->Get('plugin', 'search_field', ''));
|
$sSearchField = \trim($this->Config()->Get('plugin', 'search_field', ''));
|
||||||
$sNameField = \trim($this->Config()->Get('plugin', 'name_field', ''));
|
$sNameField = \trim($this->Config()->Get('plugin', 'name_field', ''));
|
||||||
$sEmailField = \trim($this->Config()->Get('plugin', 'mail_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))
|
if (0 < \strlen($sUsersDn) && 0 < \strlen($sObjectClass) && 0 < \strlen($sEmailField))
|
||||||
{
|
{
|
||||||
include_once __DIR__.'/LdapContactsSuggestions.php';
|
include_once __DIR__.'/LdapContactsSuggestions.php';
|
||||||
|
|
||||||
$oProvider = new LdapContactsSuggestions();
|
$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;
|
$mResult[] = $oProvider;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue