Closed (fixed)
Project:
Automated Logout
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2021 at 14:12 UTC
Updated:
15 May 2026 at 16:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
brentgComment #6
brentgCreated a patch that works on older versions as well. (8.x-1.0)
Comment #7
brentgComment #8
brentgComment #9
gombi commentedHello brentg,
I'm unable to reproduce this issue by deleting a user, as the autologout.ajax_set_last route returns 403 - Forbidden.
Could you add the steps to reproduce?
Comment #10
kerasai commentedI'm running into this with an automated test suite that rapidly creates and removes users.
An early return to treat the missing user as an anonymous user solves this.
Patch attached for 2.x branch.
Comment #11
the_g_bomb commentedLeft a comment on the MR, then spotted the patch @10, which is a similar approach to my suggested addition in the MR.
Comment #12
the_g_bomb commentedThis will need a rebase
Comment #15
deaom commentedApplied the patch to the 2.x branch and also updated gitlab-ci file to exclude the readme file for cspell. There are some eslint and phpstan error, but I think there is already an issue open to address those. Ready for review.
Comment #16
benstallings commentedClaude Code says:
The branch is clean and focused. The core fix (null user guard) is correct and minimal. The ?? → ?: / direct-access changes in autologout.module are appropriate for the 2.x (Drupal 10+) target. No concerns — this looks ready to merge.
Comment #17
the_g_bomb commentedI think the cspell improvements are out of scope for this ticket. There will be a follow up ticket to re-address cspell, phpcs and phpstan etc
Comment #18
the_g_bomb commentedI think the same application can be applied to getUserRedirectUrl().
I suspect we can also do with a regression test to strengthen this. I'll add it to the ticket to address tests.
Comment #19
the_g_bomb commentedMerged, thanks all