mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 10:09:20 +03:00
Merge ed4b2dd4e1 into c154d23cfe
This commit is contained in:
commit
8c037efed9
2 changed files with 5 additions and 4 deletions
|
|
@ -1 +1 @@
|
||||||
Plugin which allows you to set up LDAP username by email address (when IMAP/SMTP requires it)
|
This plugins allows to authenticate using LDAP mail field, yet login field would still be used for IMAP and SMTP authentication.
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ class LDAPLoginMappingPlugin extends AbstractPlugin
|
||||||
{
|
{
|
||||||
const
|
const
|
||||||
NAME = 'LDAP login mapping',
|
NAME = 'LDAP login mapping',
|
||||||
VERSION = '2.3',
|
VERSION = '2.4',
|
||||||
AUTHOR = 'RainLoop Team, Ludovic Pouzenc<ludovic@pouzenc.fr>, ZephOne<zephone@protonmail.com>',
|
AUTHOR = 'RainLoop Team, Ludovic Pouzenc<ludovic@pouzenc.fr>, ZephOne<zephone@protonmail.com>',
|
||||||
RELEASE = '2024-09-20',
|
RELEASE = '2024-01-09',
|
||||||
REQUIRED = '2.36.1',
|
REQUIRED = '2.36.1',
|
||||||
CATEGORY = 'Login',
|
CATEGORY = 'Login',
|
||||||
DESCRIPTION = 'Enable custom mapping using ldap field';
|
DESCRIPTION = 'This plugins allows to authenticate using LDAP mail field, yet login field would still be used for IMAP and SMTP authentication';
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
|
|
@ -104,6 +104,7 @@ class LDAPLoginMappingPlugin extends AbstractPlugin
|
||||||
$sResult = $this->ldapSearch($sEmail);
|
$sResult = $this->ldapSearch($sEmail);
|
||||||
if ( is_array($sResult) ) {
|
if ( is_array($sResult) ) {
|
||||||
$sImapUser = $sResult['login'];
|
$sImapUser = $sResult['login'];
|
||||||
|
$sSmtpUser = $sResult['login'];
|
||||||
$sEmail = $sResult['email'];
|
$sEmail = $sResult['email'];
|
||||||
}
|
}
|
||||||
syslog(LOG_WARNING, "plugins/ldap-login-mapping/index.php:FilterLoginСredentials() auth try: $sIP/$sEmail, resolved as $sImapUser/$sEmail");
|
syslog(LOG_WARNING, "plugins/ldap-login-mapping/index.php:FilterLoginСredentials() auth try: $sIP/$sEmail, resolved as $sImapUser/$sEmail");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue