Fix getUser (#5)
This commit is contained in:
parent
b0335735fe
commit
6af07f6f8d
1 changed files with 3 additions and 3 deletions
|
@ -60,8 +60,7 @@ class SubscriptionManagementPlugin extends ServerPlugin {
|
||||||
private IUserSession $userSession,
|
private IUserSession $userSession,
|
||||||
private TransportManager $transportManager,
|
private TransportManager $transportManager,
|
||||||
private IURLGenerator $URLGenerator,
|
private IURLGenerator $URLGenerator,
|
||||||
private SubscriptionService $subscriptionService,
|
private SubscriptionService $subscriptionService
|
||||||
private $userId,
|
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +149,8 @@ class SubscriptionManagementPlugin extends ServerPlugin {
|
||||||
$response->setStatus($responseStatus);
|
$response->setStatus($responseStatus);
|
||||||
|
|
||||||
// create subscription entry in db
|
// create subscription entry in db
|
||||||
$subscription = $this->subscriptionService->create($this->userId, $node->getName(), $subscriptionType, $subscriptionExpires, $data);
|
$user = $this->userSession->getUser();
|
||||||
|
$subscription = $this->subscriptionService->create($user->getUID(), $node->getName(), $subscriptionType, $subscriptionExpires, $data);
|
||||||
|
|
||||||
// generate default unsubscribe link, unless transport requested a custom url
|
// generate default unsubscribe link, unless transport requested a custom url
|
||||||
$unsubscribeLink = $unsubscribeLink ?? $this->URLGenerator->getAbsoluteURL("/apps/dav_push/subscriptions/" . $subscription->getId());
|
$unsubscribeLink = $unsubscribeLink ?? $this->URLGenerator->getAbsoluteURL("/apps/dav_push/subscriptions/" . $subscription->getId());
|
||||||
|
|
Loading…
Reference in a new issue