mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-11-01 09:58:49 +03:00
CardDAV (beta 2/unstable)
This commit is contained in:
parent
fb54efe922
commit
7a8fffede8
6 changed files with 175 additions and 94 deletions
|
|
@ -25,6 +25,22 @@ class AuthBasic extends \Sabre\DAV\Auth\Backend\AbstractBasic
|
|||
*/
|
||||
protected function validateUserPass($sUserName, $sPassword)
|
||||
{
|
||||
return $sPassword === $this->oPersonalAddressBook->GetUserHashByEmail($sUserName, true);
|
||||
$sHash = '';
|
||||
try
|
||||
{
|
||||
$sHash = $this->oPersonalAddressBook->GetUserHashByEmail($sUserName, true);
|
||||
}
|
||||
catch (Exception $oException) {}
|
||||
|
||||
// var_dump($sHash);
|
||||
// exit();
|
||||
|
||||
if (!empty($sHash) && $sPassword === $sHash)
|
||||
{
|
||||
$this->currentUser = $sUserName;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue