mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-25 18:19:22 +03:00
Release commit (1.7)
This commit is contained in:
parent
d5c68d1761
commit
7b97a9f85d
25 changed files with 118 additions and 74 deletions
|
|
@ -8,11 +8,20 @@ class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Account $oAccount
|
||||
* @param string $sLogin
|
||||
* @param string $sPassword
|
||||
*/
|
||||
public function isValidAccount($sLogin, $sPassword)
|
||||
{
|
||||
return !empty($sLogin) && !empty($sPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Model\Account $oAccount
|
||||
*/
|
||||
public function EventLoginPostLoginProvide(&$oAccount)
|
||||
{
|
||||
if ($oAccount instanceof \RainLoop\Account)
|
||||
if ($oAccount instanceof \RainLoop\Model\Account)
|
||||
{
|
||||
// Verify logic
|
||||
$bValid = isValidAccount($oAccount->Login(), $oAccount->Password());
|
||||
|
|
@ -23,10 +32,10 @@ class ProxyauthLoginExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
* $oAccount->Password(); // IMAP password
|
||||
* $oAccount->DomainIncHost(); // IMAP host
|
||||
*
|
||||
* @see \RainLoo\Account for more
|
||||
* @see \RainLoo\Model\Account for more
|
||||
*/
|
||||
|
||||
if ($bValid) // if verify failed
|
||||
if (!$bValid) // if verify failed
|
||||
{
|
||||
// throw a Auth Error Exception
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::AuthError);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue