bolt / bolt/users

No exception handling for routes when sessions are nullified or inactive

Open
#11 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
8
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Trying to retrieve the ContentType slug using `$contentTypeSlug = $this->getExtension()->getExtConfig('contenttype', $user->getRoles()[0]);` in `FrontendUsersProfileController.php` throws the exception `Call to a member function getRoles() on null`.

This happens when a user tries to access profile routes without an active session, either because it expired or was invalidated.

![session_issue](https://user-images.githubusercontent.com/29301735/97487573-1ab37e80-196e-11eb-8b58-ab66523a6ba0.jpg)

I have found a solution for this issue and will share for review.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.