Release commit (1.7)

This commit is contained in:
RainLoop Team 2014-11-15 00:23:46 +04:00
parent d5c68d1761
commit 7b97a9f85d
25 changed files with 118 additions and 74 deletions

View file

@ -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);