mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-09 06:28:28 +03:00
36 lines
811 B
PHP
36 lines
811 B
PHP
<?php
|
|
|
|
class ChangePasswordExampleDriver implements \RainLoop\Providers\ChangePassword\ChangePasswordInterface
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $sAllowedEmails = '';
|
|
|
|
/**
|
|
* @param string $sAllowedEmails
|
|
*
|
|
* @return \ChangePasswordExampleDriver
|
|
*/
|
|
public function SetAllowedEmails($sAllowedEmails)
|
|
{
|
|
$this->sAllowedEmails = $sAllowedEmails;
|
|
return $this;
|
|
}
|
|
|
|
public function isPossible(\RainLoop\Model\Account $oAccount) : bool
|
|
{
|
|
$sFoundedValue = '';
|
|
return $oAccount && $oAccount->Email() &&
|
|
\RainLoop\Plugins\Helper::ValidateWildcardValues($oAccount->Email(), $this->sAllowedEmails, $sFoundedValue);
|
|
}
|
|
|
|
public function ChangePassword(\RainLoop\Model\Account $oAccount, string $sPrevPassword, string $sNewPassword) : bool
|
|
{
|
|
$bResult = false;
|
|
|
|
// TODO
|
|
|
|
return $bResult;
|
|
}
|
|
}
|