mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
login.success hook is always \RainLoop\Model\MainAccount
This commit is contained in:
parent
a4ea8a46a8
commit
9df052a435
2 changed files with 7 additions and 10 deletions
|
|
@ -135,7 +135,7 @@ $Plugin->addHook('hook.name', 'functionName');
|
||||||
|
|
||||||
### login.success
|
### login.success
|
||||||
params:
|
params:
|
||||||
\RainLoop\Model\Account $oAccount
|
\RainLoop\Model\MainAccount $oAccount
|
||||||
|
|
||||||
## IMAP
|
## IMAP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ use RainLoop\Enumerations\Capa;
|
||||||
use RainLoop\Enumerations\PluginPropertyType;
|
use RainLoop\Enumerations\PluginPropertyType;
|
||||||
use RainLoop\Plugins\AbstractPlugin;
|
use RainLoop\Plugins\AbstractPlugin;
|
||||||
use RainLoop\Plugins\Property;
|
use RainLoop\Plugins\Property;
|
||||||
use RainLoop\Model\Account;
|
|
||||||
use RainLoop\Model\MainAccount;
|
use RainLoop\Model\MainAccount;
|
||||||
use RainLoop\Actions;
|
use RainLoop\Actions;
|
||||||
|
|
||||||
|
|
@ -39,18 +38,16 @@ class LdapMailAccountsPlugin extends AbstractPlugin
|
||||||
/**
|
/**
|
||||||
* Add additional mail accounts to the webinterface of the user by looking up the ldap directory
|
* Add additional mail accounts to the webinterface of the user by looking up the ldap directory
|
||||||
*
|
*
|
||||||
* @param Account $oAccount
|
* @param MainAccount $oAccount
|
||||||
*/
|
*/
|
||||||
public function AddAdditionalLdapMailAccounts(Account $oAccount)
|
public function AddAdditionalLdapMailAccounts(MainAccount $oAccount)
|
||||||
{
|
{
|
||||||
if ($oAccount instanceof MainAccount) {
|
// Set up config
|
||||||
// Set up config
|
$config = LdapMailAccountsConfig::MakeConfig($this->Config());
|
||||||
$config = LdapMailAccountsConfig::MakeConfig($this->Config());
|
|
||||||
|
|
||||||
$oldapMailAccounts = new LdapMailAccounts($config, $this->Manager()->Actions()->Logger());
|
$oldapMailAccounts = new LdapMailAccounts($config, $this->Manager()->Actions()->Logger());
|
||||||
|
|
||||||
$oldapMailAccounts->AddLdapMailAccounts($oAccount);
|
$oldapMailAccounts->AddLdapMailAccounts($oAccount);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue