Skip to content

Fix login when a different user is already logged in - #127

Closed
GigaUmbo wants to merge 4 commits into
catalyst:MOODLE_405_STABLEfrom
GigaUmbo:fix/switch-user-session-regenerate
Closed

GigaUmbo wants to merge 4 commits into
catalyst:MOODLE_405_STABLEfrom
GigaUmbo:fix/switch-user-session-regenerate

Conversation

@GigaUmbo

@GigaUmbo GigaUmbo commented Sep 1, 2026 •

Copy link
Copy Markdown

Supersedes #125.

Includes original changes from @MartinR2295 with the requested version bump to pass the CI check.

thanks @dmitriim

Martin Rader and others added 4 commits July 29, 2026 09:23
  require_logout() closes the PHP session, so completing the login in the same
  request made complete_user_login()'s session_regenerate_id() run against a
  closed session. Log the old user out and redirect back to the login endpoint
  so the key login runs on a clean session; the key is not consumed until after
  that branch, so it is still valid on the second pass.

  Fixes catalyst#102
@GigaUmbo

GigaUmbo commented Sep 3, 2026

Copy link
Copy Markdown
Author

@dmitriim please check and run it. thanks

@dmitriim

dmitriim commented Sep 3, 2026

Copy link
Copy Markdown
Member

#125 has been merged. Closing this one off

@dmitriim dmitriim closed this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants