aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Cdav.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-10 21:58:44 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-10 21:58:44 +0200
commit0e3b5536e2a576c3959bf6644103c7a676684024 (patch)
treeacb04e153cd1084bce24163198be005fd0ffd59d /Zotlabs/Module/Cdav.php
parent0a96cdd950f30974fe0fecf60b214701673dad86 (diff)
downloadvolse-hubzilla-0e3b5536e2a576c3959bf6644103c7a676684024.tar.gz
volse-hubzilla-0e3b5536e2a576c3959bf6644103c7a676684024.tar.bz2
volse-hubzilla-0e3b5536e2a576c3959bf6644103c7a676684024.zip
create cdav principal also on client access and remove redundant pconfig check in authentication process
Diffstat (limited to 'Zotlabs/Module/Cdav.php')
-rw-r--r--Zotlabs/Module/Cdav.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php
index bc563ab43..d0619ef0b 100644
--- a/Zotlabs/Module/Cdav.php
+++ b/Zotlabs/Module/Cdav.php
@@ -85,6 +85,15 @@ class Cdav extends \Zotlabs\Web\Controller {
if($channel['channel_timezone'])
$auth->setTimezone($channel['channel_timezone']);
$auth->observer = $channel['channel_hash'];
+
+ $principalUri = 'principals/' . $channel['channel_address'];
+ if(!cdav_principal($principalUri)) {
+ $this->activate($pdo, $channel);
+ if(!cdav_principal($principalUri)) {
+ return;
+ }
+ }
+
}