mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
v2.25.2
This commit is contained in:
parent
565ef41eba
commit
78938caaf3
10 changed files with 85 additions and 45 deletions
|
|
@ -25,19 +25,14 @@ class CustomLoginMappingPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
public function FilterLoginCredentials(&$sEmail, &$sLogin, &$sPassword)
|
||||
{
|
||||
$sMapping = \trim($this->Config()->Get('plugin', 'mapping', ''));
|
||||
if (!empty($sMapping))
|
||||
{
|
||||
if (!empty($sMapping)) {
|
||||
$aLines = \explode("\n", \preg_replace('/[\r\n\t\s]+/', "\n", $sMapping));
|
||||
foreach ($aLines as $sLine)
|
||||
{
|
||||
if (false !== strpos($sLine, ':'))
|
||||
{
|
||||
foreach ($aLines as $sLine) {
|
||||
if (false !== \strpos($sLine, ':')) {
|
||||
$aData = \explode(':', $sLine, 2);
|
||||
if (is_array($aData) && !empty($aData[0]) && isset($aData[1]))
|
||||
{
|
||||
if (\is_array($aData) && !empty($aData[0]) && isset($aData[1])) {
|
||||
$aData = \array_map('trim', $aData);
|
||||
if ($sEmail === $aData[0] && 0 < strlen($aData[1]))
|
||||
{
|
||||
if ($sEmail === $aData[0] && \strlen($aData[1])) {
|
||||
$sLogin = $aData[1];
|
||||
}
|
||||
}
|
||||
|
|
@ -46,9 +41,6 @@ class CustomLoginMappingPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function configMapping() : array
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ class LdapContactsSuggestionsPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
const
|
||||
NAME = 'Contacts suggestions (LDAP)',
|
||||
VERSION = '2.11',
|
||||
RELEASE = '2023-01-27',
|
||||
VERSION = '2.12',
|
||||
RELEASE = '2023-01-31',
|
||||
REQUIRED = '2.23.0',
|
||||
CATEGORY = 'Contacts',
|
||||
DESCRIPTION = 'Get contacts suggestions from LDAP.';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue