Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User session expiration #1215

Closed
tcitworld opened this issue Apr 3, 2019 · 1 comment
Closed

User session expiration #1215

tcitworld opened this issue Apr 3, 2019 · 1 comment
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug
Milestone

Comments

@tcitworld
Copy link
Member

tcitworld commented Apr 3, 2019

See /~https://github.com/nextcloud/calendar/blob/master/controller/settingscontroller.php#L59

If $userSession->getUser() returs null, we have

Error: Call to a member function getUID() on null

The fix in is the vue branch

$user = $userSession->getUser();
if ($user) {
  $this->userId = $user->getUID();
}

Even better would be to throw an appropriate exception, because it doesn't seem to be handled further down.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@tcitworld tcitworld added 1. to develop Accepted and waiting to be taken care of bug labels Apr 3, 2019
@georgehrke georgehrke self-assigned this Sep 11, 2019
@georgehrke georgehrke added this to the 2.0.0 beta2 milestone Sep 11, 2019
@georgehrke georgehrke modified the milestones: 2.0.0 beta2, 2.0.0 beta1 Oct 18, 2019
@georgehrke
Copy link
Member

Implemented in #926

We don't use UserSession anymore. Where necessary, we inject $userId via DI directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

No branches or pull requests

2 participants