From c732cec62fc8e9ecd0560ff5090ee3dccbfb0401 Mon Sep 17 00:00:00 2001 From: cm-schl <63400209+cm-schl@users.noreply.github.com> Date: Tue, 7 Mar 2023 15:31:09 +0100 Subject: [PATCH] Clearer description whats username for in the config --- plugins/ldap-mail-accounts/LdapMailAccounts.php | 8 ++++---- plugins/ldap-mail-accounts/index.php | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/ldap-mail-accounts/LdapMailAccounts.php b/plugins/ldap-mail-accounts/LdapMailAccounts.php index 066ee0a35..e68e9e179 100644 --- a/plugins/ldap-mail-accounts/LdapMailAccounts.php +++ b/plugins/ldap-mail-accounts/LdapMailAccounts.php @@ -62,7 +62,7 @@ class LdapMailAccounts try { $this->EnsureBound(); } catch (LdapMailAccountsException $e) { - return false; // exceptions are only thrown from the handleerror function that does logging already + return false; // exceptions are only thrown from the handle error function that does logging already } // Try to get account information. IncLogin() returns the username of the user @@ -96,7 +96,7 @@ class LdapMailAccounts ); } catch (LdapMailAccountsException $e) { - return false; // exceptions are only thrown from the handleerror function that does logging already + return false; // exceptions are only thrown from the handle error function that does logging already } if (count($mailAddressResults) < 1) { $this->logger->Write("Could not find user $username in LDAP! Overwriting of main mail address not possible.", \LOG_NOTICE, self::LOG_KEY); @@ -128,7 +128,7 @@ class LdapMailAccounts try { $this->EnsureBound(); } catch (LdapMailAccountsException $e) { - return false; // exceptions are only thrown from the handleerror function that does logging already + return false; // exceptions are only thrown from the handle error function that does logging already } // Try to get account information. IncLogin() returns the username of the user @@ -157,7 +157,7 @@ class LdapMailAccounts ); } catch (LdapMailAccountsException $e) { - return false; // exceptions are only thrown from the handleerror function that does logging already + return false; // exceptions are only thrown from the handle error function that does logging already } if (count($mailAddressResults) < 1) { $this->logger->Write("Could not find user $username", \LOG_NOTICE, self::LOG_KEY); diff --git a/plugins/ldap-mail-accounts/index.php b/plugins/ldap-mail-accounts/index.php index 345ad602a..8d28d1e78 100644 --- a/plugins/ldap-mail-accounts/index.php +++ b/plugins/ldap-mail-accounts/index.php @@ -139,11 +139,14 @@ $this->Manager()->Actions()->Logger()->Write("Login DATA: login: $sLogin email: ->SetDefaultValue("uid=#USERNAME#"), \RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_USERNAME) - ->SetLabel("Username field of additional account") + ->SetLabel("Username field") ->SetType(RainLoop\Enumerations\PluginPropertyType::STRING) - ->SetDescription("The field containing the username of the found additional mail account. - \nThis username gets used by SnappyMail to login to the additional mail account. - \nIf this field contains an email address, only the local-part before the @ is used.") + ->SetDescription("Used when searching for additional accounts or when overwriting the mail address of the main account. + \nThe field containing the username of the mail account. + \nWhen looking up additional accounts: + \nIf this field contains an email address, only the local-part before the @ is used. The domain part is retrieved configuring the field below. This username gets used by SnappyMail to login to the additional mail account + \nWhen overwriting the main account mail address: + \nThe username from SnappyMail login gets used to search an LDAP entry containig a field with the same username.") ->SetDefaultValue("uid"), \RainLoop\Plugins\Property::NewInstance(LdapMailAccountsConfig::CONFIG_FIELD_MAIL_DOMAIN)