mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
CardDAV (pre-release)
This commit is contained in:
parent
7a8fffede8
commit
639d8c58f6
38 changed files with 525 additions and 207 deletions
|
|
@ -930,14 +930,35 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken(false);
|
||||
if ($oAccount instanceof \RainLoop\Account)
|
||||
{
|
||||
$oPab = $this->PersonalAddressBookProvider($oAccount);
|
||||
|
||||
|
||||
$aResult['Auth'] = true;
|
||||
$aResult['Email'] = $oAccount->Email();
|
||||
$aResult['IncLogin'] = $oAccount->IncLogin();
|
||||
$aResult['OutLogin'] = $oAccount->OutLogin();
|
||||
$aResult['AccountHash'] = $oAccount->Hash();
|
||||
$aResult['ChangePasswordIsAllowed'] = $this->ChangePasswordProvider()->PasswordChangePossibility($oAccount);
|
||||
$aResult['ContactsIsAllowed'] = $this->PersonalAddressBookProvider($oAccount)->IsActive();
|
||||
$aResult['ContactsSharingIsAllowed'] = $this->PersonalAddressBookProvider($oAccount)->IsSharingAllowed();
|
||||
$aResult['ContactsIsAllowed'] = $oPab->IsActive();
|
||||
$aResult['ContactsSharingIsAllowed'] = $oPab->IsSharingAllowed();
|
||||
|
||||
$aResult['ContactsSyncIsAllowed'] = (bool) $oConfig->Get('contacts', 'allow_sync', false);
|
||||
$aResult['ContactsSyncServer'] = '';
|
||||
$aResult['ContactsSyncUser'] = '';
|
||||
$aResult['ContactsSyncPassword'] = '';
|
||||
$aResult['ContactsSyncPabUrl'] = '';
|
||||
|
||||
if ($aResult['ContactsSyncIsAllowed'])
|
||||
{
|
||||
$aResult['ContactsSyncServer'] = $this->Http()->GetHost(false, true, true);
|
||||
$aResult['ContactsSyncUser'] = $oAccount->ParentEmailHelper();
|
||||
$aResult['ContactsSyncPassword'] = $oPab->GetUserHashByEmail($aResult['ContactsSyncUser'], true);
|
||||
|
||||
$sUrl = \rtrim(\trim($this->Http()->GetScheme().'://'.$this->Http()->GetHost(true, false).$this->Http()->GetPath()), '/\\');
|
||||
$sUrl = \preg_replace('/index\.php(.*)$/i', '', $sUrl);
|
||||
|
||||
$aResult['ContactsSyncPabUrl'] = $sUrl.'/index.php/dav/addressbooks/'.$oAccount->ParentEmailHelper().'/default/';
|
||||
}
|
||||
|
||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue