Enabled hook_user_logout functionality

Created on 18 May 2022, about 2 years ago
Updated 21 January 2023, over 1 year ago

Enabled & tweaked the code for hook_user_logout(). Code has been tested against a production IdP and confirmed as working.

Also added form validation for logout URL value on Drupal Login Config form.

๐Ÿ“Œ Task
Status

Needs work

Version

4.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom karengrey

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • @jproctor opened merge request.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States jproctor

    Okay, I rerolled the patch without the form validation and made an issue fork and merge request.

    I have two questions:

    1. Should it log something when the user logs out? It never has, but it feels like this might be useful.

    2. The end of the function looks like this:

      // Force redirect if saml_request is not empty.
      if(!empty($saml_request)) {
        $redirect = new RedirectResponse($url);
        $redirect->send();
      }
    

    Is it possible for $saml_request to be empty? What would happen?

    My IdP isnโ€™t set up for single logout, so I canโ€™t easily test that this actually works.

Production build 0.69.0 2024