Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlindsey15’s picture

Title: #2062097: Remove calls to deprecated global $user in core/includes/session.inc » #2062771: Remove calls to deprecated global $user in core/includes/session.inc

Oops that's what I get for copy-pasting a title...

jlindsey15’s picture

Status: Active » Needs review
FileSize
2.17 KB

Status: Needs review » Needs work

The last submitted patch, rename-global-user-2062771-2.patch, failed testing.

jlindsey15’s picture

Assigned: jlindsey15 » Unassigned
sergeypavlenko’s picture

Status: Needs work » Needs review

#2: rename-global-user-2062771-2.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, rename-global-user-2062771-2.patch, failed testing.

jlindsey15’s picture

Assigned: Unassigned » jlindsey15

Yeah installation is having some errors locally but I'm not really sure why... Ill try to figure it out.

joelpittet’s picture

Assigned: jlindsey15 » Unassigned
Status: Needs work » Needs review
FileSize
2.03 KB

Status: Needs review » Needs work

The last submitted patch, 2062771-global-user-depricated-session.patch, failed testing.

joelpittet’s picture

Something's fishy on this one...

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 2062771-global-user-depricated-session.patch, failed testing.

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: 2062771-global-user-depricated-session.patch, failed testing.

Berdir’s picture

Issue summary: View changes

Similar to the problem with the timezone function, this can not work.

session.inc is what provides $user, you can't call currentUser() there, that's a loop.

While it might work for methods that save the session, loading is not going to work. If anything, you'd have to remove the global completely, but that will then again throw off the timezone function. And there are also special cases still for install/update, that call functions in there directly. I suggest this gets postponed on the other conversions, specifically the one that deal with the timezone function (common.inc?, bootstrap.inc).

joelpittet’s picture

Gladly, I'll postpone the remaining items as they are likely all related. Which issue shall I postpone them on? This one maybe #1858196: [meta] Leverage Symfony Session components?

joelpittet’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 8: 2062771-global-user-depricated-session.patch, failed testing.

ianthomas_uk’s picture

Status: Needs work » Postponed
andypost’s picture

Currently the authentication happens in \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::onKernelRequestMaintenance() where $this->account->isAuthenticated() is executed

almaudoh’s picture

Title: #2062771: Remove calls to deprecated global $user in core/includes/session.inc » #2062771: Remove calls to deprecated global $user in \Drupal\Core\Session\SessionManager
Parent issue: » #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']
Related issues: +#2371629: [meta] Finalize Session and User Authentication API

After #2228341: Objectify session management functions + remove session.inc, session.inc was moved to SessionManager, so re-titling

Berdir’s picture

Status: Postponed » Closed (duplicate)

See #2328645: Remove remaining global $user, closing as duplicate of that.