aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/BasicAuth.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-05-06 19:56:47 +0000
committerMario <mario@mariovavti.com>2020-05-06 19:56:47 +0000
commitef94072cee64aa465a8fb1b7e11b45591589eba9 (patch)
tree6ec3600574263981b3224f14ac6d39fff0cdb9d5 /Zotlabs/Storage/BasicAuth.php
parentff3ff2478dabc642def14193a01649a384f3a88a (diff)
parent2757822cd8d23de65b65c59874a6c032d73aba81 (diff)
downloadvolse-hubzilla-ef94072cee64aa465a8fb1b7e11b45591589eba9.tar.gz
volse-hubzilla-ef94072cee64aa465a8fb1b7e11b45591589eba9.tar.bz2
volse-hubzilla-ef94072cee64aa465a8fb1b7e11b45591589eba9.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Storage/BasicAuth.php')
-rw-r--r--Zotlabs/Storage/BasicAuth.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zotlabs/Storage/BasicAuth.php b/Zotlabs/Storage/BasicAuth.php
index a5c01fbb7..3a48f5004 100644
--- a/Zotlabs/Storage/BasicAuth.php
+++ b/Zotlabs/Storage/BasicAuth.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Storage;
+use App;
use Sabre\DAV;
use Sabre\HTTP\RequestInterface;
use Sabre\HTTP\ResponseInterface;
@@ -128,6 +129,16 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic {
$this->channel_name = $r['channel_address'];
$this->channel_id = $r['channel_id'];
$this->channel_hash = $this->observer = $r['channel_hash'];
+
+ if ($this->observer) {
+ $r = q("select * from xchan where xchan_hash = '%s' limit 1",
+ dbesc($this->observer)
+ );
+ if ($r) {
+ App::set_observer(array_shift($r));
+ }
+ }
+
$_SESSION['uid'] = $r['channel_id'];
$_SESSION['account_id'] = $r['channel_account_id'];
$_SESSION['authenticated'] = true;