Logout compatibility with Masquerade module

Created on 12 July 2016, over 8 years ago
Updated 18 September 2023, over 1 year ago

I have a website where some of the users are authenticated through SAML. However most users are not (and none of the admin users are).

In simplesamlphp_auth_user_logout() the current user's session is destroyed to avoid infinite loops.

However, this breaks the functionality of the Masquerade module (that offers admin the ability to login as another user).

Can we commit this patch that will make the code in simplesamlphp_auth_user_logout() inactive for non-SAML authenticated users?

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇩🇰Denmark bjaxelsen

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.

  • Was this ever fixed? I still get issues using 8.x-2.0-rc4 on Drupal 9.5.9 when trying to masquerade as a SAML authenticated user

    Error: Call to undefined method Drupal\user\Entity\User::setAccount() in simplesamlphp_auth_user_logout() (line 68 of /code/web/modules/contrib/simplesamlphp_auth/simplesamlphp_auth.module)

Production build 0.71.5 2024