Problem/Motivation
I have only really noticed this as an issue when using the masquerade module to be fair. But, when attempting to masquerade with the i18n_sso module enabled, I get the following error.
TypeError: i18n_sso_user_logout(): Argument #1 ($account) must be of type Drupal\Core\Session\AccountProxyInterface, Drupal\user\Entity\User given in i18n_sso_user_logout()
I can see the current function definition for i18n_sso's hook_user_logout() hook is
function i18n_sso_user_logout(AccountProxyInterface $account)
when I believe it should be
function i18n_sso_user_logout(AccountInterface $account)
to match the definition provided in hook_user_logout().
Steps to reproduce
Install both the masquerade module and the i18n_sso module.
Log in as an admin user, and attempt to masquerade as another user.
Proposed resolution
Update the type declaration for $account in i18n_sso_user_logout() to be Drupal\Core\Session\AccountInterface
Comment | File | Size | Author |
---|---|---|---|
#2 | i18n_sso-3421372.patch | 473 bytes | abhishek_gupta1 |
Issue fork i18n_sso-3421372
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
Comment #2
abhishek_gupta1 CreditAttribution: abhishek_gupta1 at Virasat Solutions commented@Shamrockonov, I have fixed the issue and created Patch. please kindly review.
Comment #4
ShamrockonovHi @abhishek_gupta1,
Based on hook_user_logout, the $account argument should be of type Drupal\Core\Session\AccountInterface.
I've created a merge request which will need reviewing.
Comment #5
GrimreaperComment #6
ShamrockonovComment #9
GrimreaperThanks for the bug report and the MR.
Creating a new release.