Problem/Motivation

It would be nice to be able to hook into the user logout function if we need to do something at the time that a user is logged out automatically.

Proposed resolution

Create a hook that is invoked in the user logout function in autologout.api.php.

Issue fork autologout-3310136

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

RyanCMcConnell created an issue. See original summary.

RyanCMcConnell’s picture

StatusFileSize
new1.52 KB
RyanCMcConnell’s picture

Status: Active » Needs review
gombi’s picture

Assigned: RyanCMcConnell » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1 KB
new296 bytes

I've tested the attached patch and can confirm that it works as described.

There was an issue with an unused use statement for UserInterface which I've removed in the patch attached to this comment.

DeaOm made their first commit to this issue’s fork.

deaom’s picture

Pushed the code to issue fork for easier maintenance. The code does work, the hook (when added) is triggered if user is automatically logged out. Leaving it to RTBC.

deaom’s picture

Rebased the branch so it includes the new GitLab CI testing. Test are passing now, so ready to merge.

cedrichillion made their first commit to this issue’s fork.

jrglasgow made their first commit to this issue’s fork.

  • jrglasgow committed e836782d on 8.x-1.x authored by DeaOm
    Issue #3310136 by DeaOm, cedrichillion, gombi, RyanCMcConnell: Create...
jrglasgow’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.