mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-08 22:18:28 +03:00
Move plugins to webmail repository.
This commit is contained in:
parent
17958b15cb
commit
cf0968b5a8
32 changed files with 4348 additions and 0 deletions
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
class ChangePasswordExampleDriver implements \RainLoop\Providers\ChangePassword\ChangePasswordInterface
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $aDomains = array();
|
||||
|
||||
/**
|
||||
* @param array $aDomains
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function SetAllowedDomains($aDomains)
|
||||
{
|
||||
if (\is_array($aDomains) && 0 < \count($aDomains))
|
||||
{
|
||||
$this->aDomains = $aDomains;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Account $oAccount
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function PasswordChangePossibility($oAccount)
|
||||
{
|
||||
return $oAccount && $oAccount->Domain() &&
|
||||
\in_array(\strtolower($oAccount->Domain()->Name()), $this->aDomains);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \RainLoop\Account $oAccount
|
||||
* @param string $sPrevPassword
|
||||
* @param string $sNewPassword
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function ChangePassword(\RainLoop\Account $oAccount, $sPrevPassword, $sNewPassword)
|
||||
{
|
||||
$bResult = false;
|
||||
|
||||
// TODO
|
||||
|
||||
return $bResult;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue