Ticket #2620 (reopened enhancement)
Fix user logout when accessing permission denied page.
| Reported by: | scott@… | Assigned to: | sminnee |
|---|---|---|---|
| Type: | enhancement | Priority: | medium |
| Milestone: | Component: | Sapphire Framework | |
| Version: | 2.2.2 | Severity: | medium effort / impact |
| Keywords: | security, login, logout | Cc: | scott@startgrid.com |
| Due date: | Harvest Task: | (Unknown) | |
| Invoice sent to client: | 0 | Hours: |
Description
User A has does not have access to page X and tries to access this page. When they do they currently get logged out and presented with a page requesting a user's login which has access to this page. If you then navigate away from this page you are logged out. If user A goes now to page Y which they do have access to and try to login they get redirected to page X and logged out again.
This is simply fixed by not logging out the current user.
Remove the current lines 161 and 162 in sapphire/security/sapphire.php (rev. 56921) which are:
161 if($member = Member::currentUser())
162 $member->logout();
