Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is the opposite of #361471-43: Global $user object should be a complete entity
We should rename global $user
into $session
or similar. That's what is is, {session}
.
Admittedly, for convenience, {users}
and {users_roles}
is tacked onto it, but selling that as $user
is the bug in the first place.
Let's see what breaks.
Comment | File | Size | Author |
---|---|---|---|
drupal8.user-session.0.patch | 3.43 KB | sun | |
Comments
Comment #2
RobLoachI like this idea. It'll transition quite nicely with #335411: Switch to Symfony2-based session handling and #1545680: Convert all uses of $_SESSION to symfony session syntax.
Comment #3
cosmicdreams CreditAttribution: cosmicdreams commenteddrupal8.user-session.0.patch queued for re-testing.
Comment #5
catchIn #335411: Switch to Symfony2-based session handling there was some brief discussion of putting the {users} and {users_roles} information actually into $_SESSION itself, so $_SESSION['user'] or similar. Is it worth trying that here?
Comment #6
sunI'd rather move in small steps. Apparently, the patch in #0 wasn't even able to install Drupal, which most likely means that the dependencies on {users} fields on global $user already start in the installer... :(
We need to figure out what exactly that is.
Comment #7
sunThe Drupal installation failures in the patch in #0 will be resolved via:
#782672: Loosen the coupling between the user module and the installer/maintenance theme
#347988: Move $user->data into own table
Comment #8
D34dMan CreditAttribution: D34dMan commenteddrupal8.user-session.0.patch queued for re-testing.
Comment #10
jp.stacey CreditAttribution: jp.stacey at Magnetic Phield commentedGlobal $user no longer exists, since #2328645: Remove remaining global $user. Should this therefore be closed as "cannot reproduce"?
Comment #11
Fabianx CreditAttribution: Fabianx commentedYup, thanks for the ping, this is closed (duplicate).