Implementation of hook_user_logout() should use AccountInterface instead of AccountProxy, in other case I get an error:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to discourse_sso_user_logout() must be an instance of Drupal\Core\Session\AccountProxy, instance of Drupal\Core\Session\UserSession given in discourse_sso_user_logout() (line 13 of modules/contrib/discourse_sso/discourse_sso.module).
discourse_sso_user_logout(Object)
call_user_func_array('discourse_sso_user_logout', Array) (Line: 403)
...
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3089401-2.discourse_sso.hook_user_logout-use-AccountInterface-instead-of-AccountProxy.patch | 744 bytes | ugolek |
Comments
Comment #2
ugolek commentedPatch attached.
Comment #3
ugolek commentedComment #4
jurgenhaasComment #5
junglePer core/modules/user/user.api.php, the patch looks good to me, thanks @lebster!
Comment #6
jurgenhaasThanks @lebster and @jungle, fix got committed as part of the rector cleanup already but providing credit here.