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 TransportManager $transportManager,
|
||||
private IURLGenerator $URLGenerator,
|
||||
private SubscriptionService $subscriptionService,
|
||||
private $userId,
|
||||
private SubscriptionService $subscriptionService
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -150,7 +149,8 @@ class SubscriptionManagementPlugin extends ServerPlugin {
|
|||
$response->setStatus($responseStatus);
|
||||
|
||||
// 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
|
||||
$unsubscribeLink = $unsubscribeLink ?? $this->URLGenerator->getAbsoluteURL("/apps/dav_push/subscriptions/" . $subscription->getId());
|
||||
|
|
Loading…
Reference in a new issue