Part of #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']
All places in History module should be fixed:
core/modules/block/block.module: $not_cacheable = $GLOBALS['user']->id() == 1 ||
core/modules/block/lib/Drupal/block/BlockAccessController.php: global $user;
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | block-remove-global-user-from-block-module-2062091-3.patch | 628 bytes | m1r1k |
| #1 | block-remove-global-user-from-block-module-2062091-1.patch | 1.93 KB | m1r1k |
Comments
Comment #1
m1r1k commentedHere is the patch
Comment #3
m1r1k commentedRe-roll after #2062151: Create a current user service to ensure that current account is always available. Just minor fix left.
Comment #4
andypostThat's good clean-up
Comment #5
webchickWhile I'd much rather do #2053489: Standardize on \Drupal throughout core, I confirm this is consistent with procedural code in core today, so seems like a reasonable fix.
Committed and pushed to 8.x. Thanks!
Comment #6
webchickHrm. Well. Committed, not yet pushed:
I'll try again tomorrow. :P