Following https://drupal.org/node/2032447 it is possible to remove (nearly) all calls to the deprecated global user object and replace them a variable from the request object.

Plan

Resolve #2062151: Create a current user service to ensure that current account is always available
This task can be completed with the following steps:

  • Create META issue
  • Create sample child issue
    Sample issue for tracker module: #2047935: Remove references to global user variable in tracker module
  • Get feedback on child issue
    Given that this META issue spans much of the code base and would require numerous child issues, it's best to get community input and an indication that these changes are commit-worthy before creating all other child issues.
  • Create all child issues
    Below is the results of a grep for all global user calls. Child issues should be created for each module and each file in /includes, /lib and /scripts. Issues should be added as they are created to the list of links on this META issue.
  • Add patches to all child issues
  • Review patches for all child issues
  • Commit patches for all child issues

Remaining child issues (not tests)

Module Issue
AuthenticationManager #2061953: Remove calls to deprecated global $user in core/lib/Drupal/Core/Authentication/AuthenticationManager.php Needs to happen last!
bootstrap.inc #2062069: Remove calls to deprecated global $user in core/includes/bootstrap.inc
SessionManager #2062771: #2062771: Remove calls to deprecated global $user in \Drupal\Core\Session\SessionManager
User module #2328645: Remove remaining global $user

Child issues (tests)

Due to simpletests & install needing global $user/$GLOBALS['user'] Here is separate issues for those: @see Change Record

"NOTE: The global $user variable still exists as it is necessary for certain portions of the installer and simpletest..."

Module Issue
DateTimeTest #2328645: Remove remaining global $user

Replacement instructions

From the change notice instructions:

Drupal 7:

public function behave() {
  global $user;
  if ($user->uid == 1) {
    return "Hiya, boss!";
  }
  else {
    return "You are not the site administrator.";
  }
}

Drupal 8:

public function behave() {
  $account = \Drupal::currentUser();
  if ($account->id() == 1) {
    return "Hiya, boss!";
  }
  else {
    return "You are not the site administrator.";
  }
}

All references to global user variable

grep -R -e   "GLOBALS\['user'\]"    -e "global .*\$user"  *
core/scripts/generate-d7-content.sh:  $original_user = $GLOBALS['user'];
core/scripts/generate-d7-content.sh:    $GLOBALS['user'] = drupal_anonymous_user();// We should have already allowed anon to vote.
core/includes/bootstrap.inc:  global $user;
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // The global $user object is included for backward compatibility only
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // @todo Remove this line once global $user is no longer used.
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        $GLOBALS['user'] = $anonymous_user;
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionManagerInterface.php:   * dangerous operations, such as manipulating the global $user object.
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Authentication/Provider/Cookie.php:    global $user;
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    global $user;
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    // The global $user object is included for backward compatibility only and
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    // @todo Remove this line once global $user is no longer used.
core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php:    if ($GLOBALS['user']->isAnonymous() && $exception instanceof AccessDeniedHttpException) {
core/modules/system/src/Tests/Datetime/DrupalDateTimeTest.php:    global $user;
core/modules/system/src/Tests/Datetime/DrupalDateTimeTest.php:    // Disable session saving as we are about to modify the global $user.
core/modules/user/user.module: * Drupal has a global $user object, which represents the currently-logged-in
core/modules/user/user.module: * user. So to avoid confusion and to avoid clobbering the global $user object,
core/modules/user/user.module: * The global $user object is replaced with the passed in account.
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  global $user;

Comments

stevector’s picture

Issue summary: View changes

Correcting change notice link

pwolanin’s picture

pwolanin’s picture

Issue summary: View changes

singular/plural fix

andypost’s picture

Issue tags: +CodeSprintUA

Nice issue for code sprint

merdekiti’s picture

andypost’s picture

Assigned: Unassigned » andypost
andypost’s picture

Issue summary: View changes

_account

orb’s picture

core/modules/filter/filter.module: global $user; #2061885: Remove calls to deprecated global $user in filter module
core/modules/toolbar/toolbar.module: global $user; #2061897: Remove calls to deprecated global $user in toolbar module

orb’s picture

Issue summary: View changes

Procedural code implementation clean-up

alphawebgroup’s picture

Issue summary: View changes

Added issues list.

victor-shelepen’s picture

Issue summary: View changes

Issues have been added.

danylevskyi’s picture

Issue summary: View changes

Added one more issue.

alphawebgroup’s picture

Issue summary: View changes

added assigned tasks

sergeypavlenko’s picture

Issue summary: View changes

Add child issue

sergeypavlenko’s picture

#2061895: Remove calls to deprecated global $user in file module:
core/modules/file/file.module: global $user;
core/modules/file/file.module: global $user;
core/modules/file/file.module: global $user;
core/modules/file/lib/Drupal/file/Tests/ValidatorTest.php: global $user;

#2061903: Remove calls to deprecated global $user in contact module
core/modules/contact/contact.module: global $user;
core/modules/contact/contact.pages.inc: global $user;
core/modules/contact/lib/Drupal/contact/MessageFormController.php: global $user;
core/modules/contact/lib/Drupal/contact/MessageFormController.php: global $user;

#2062097: Remove calls to deprecated global $user in theme.inc
core/includes/theme.inc: global $user;

#2062353: Remove calls to deprecated global $user in translation module
core/modules/translation/translation.module: $account = $GLOBALS['user'];

#2062363: Remove calls to deprecated global $user in core/modules/system/tests/modules/form_test/form_test.module
core/modules/system/tests/modules/form_test/form_test.module: global $user;

#2062501: Remove calls to deprecated global $user in field module
core/modules/field/field.module: global $user;

alphawebgroup’s picture

views module
#2061921: Remove calls to deprecated global $user in views module

#2062169: Remove calls to deprecated global $user in views plugin CachePluginBase.php of views module Assigned to: alphawebgroup
core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php: global $user;
core/modules/views/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php: global $user;

#2062227: Remove calls to deprecated global $user in views plugin DisplayPluginBase.php of views module Assigned to: alphawebgroup
core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php: global $user;

#2062261: Remove calls to deprecated global $user in views plugin FilterPluginBase.php of views module Assigned to: alphawebgroup
core/modules/views/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php: global $user;

#2062421: Remove calls to deprecated global $user in ViewExecutable.php of views module Assigned to: alphawebgroup
core/modules/views/lib/Drupal/views/ViewExecutable.php: $account = $GLOBALS['user'];

views_ui module
#2061925: Remove calls to deprecated global $user in views_ui module Assigned to: alphawebgroup
core/modules/views_ui/lib/Drupal/views_ui/ViewUI.php: return is_object($this->lock) && ($this->lock->owner != $GLOBALS['user']->id());

andypost’s picture

andypost’s picture

Issue summary: View changes
orb’s picture

Issue summary: View changes

Updated issue summary.

anpolimus’s picture

Issue summary: View changes

added link to 2061953 task

dstorozhuk’s picture

Issue summary: View changes
sergeypavlenko’s picture

Issue summary: View changes

Add child issue

dstorozhuk’s picture

m1r1k’s picture

Issue summary: View changes

Updated issue summary.

Garbar’s picture

alphawebgroup’s picture

alphawebgroup’s picture

Issue summary: View changes
sergeypavlenko’s picture

Issue summary: View changes
sergeypavlenko’s picture

Issue summary: View changes

Updated issue summary.

alphawebgroup’s picture

#2062129: Remove calls to deprecated global $user in php module
core/modules/php/lib/Drupal/php/Plugin/Filter/Php.php: global $user;

tim.plunkett’s picture

sergeypavlenko’s picture

Issue summary: View changes

Updated issue summary.

sergeypavlenko’s picture

Issue summary: View changes

Updated issue summary.

sergeypavlenko’s picture

Issue summary: View changes

added meta

jlindsey15’s picture

Issue summary: View changes

Added link to child issue #2062097

larowlan’s picture

larowlan’s picture

larowlan’s picture

Status: Postponed » Active

Back to active, Drupal::currentUser()->hasPermission() should replace user_access()

larowlan’s picture

Issue summary: View changes

Added child issue

m1r1k’s picture

Issue summary: View changes

Add some new related subissues for (REST and Serialization modules)

andypost’s picture

andypost’s picture

Issue summary: View changes

Add subissue for Editor module

stevector’s picture

Issue summary: View changes

Wrapping completed list items in the del tag

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

updated from change request

joelpittet’s picture

Issue summary: View changes

Updated d8 exampl with namespace \Drupal

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Pretty sure most or maybe half of the remaining needs work issues are blocked by #1858196: [meta] Leverage Symfony Session components

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

joelpittet’s picture

Issue summary: View changes

Updated issue summary.

andypost’s picture

The only one critical holds the rest

alphawebgroup’s picture

joelpittet’s picture

the grep doesn't find the sneaky ones.

global $theme, $user, $theme_key;

Try this instead:
grep -R -e "GLOBALS\['user'\]" -e "global .*\$user" *

joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes
YesCT’s picture

Issue summary: View changes

adding header, missed the separate table for tests at first.

joelpittet’s picture

Issue summary: View changes
Issue tags: -CodeSprintCIS
joelpittet’s picture

Issue summary: View changes
Issue tags: -CodeSprintCIS
joelpittet’s picture

Issue summary: View changes

Added system tests and history tests to it's own table.

joelpittet’s picture

Issue summary: View changes

Added contact module issue to issue summary table.

joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes

Updated issue summary Grep to be a bit more accurate and the current results... we probably need a few more child issues created for the little bits.

joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Thinking the following may still need sub-issues created?

Needs Sub Issue?

core/includes/common.inc:  $original_user = $GLOBALS['user'];
core/includes/common.inc:  $GLOBALS['user'] = drupal_anonymous_user();
core/includes/common.inc:  $GLOBALS['user'] = $original_user;
core/includes/common.inc:  global $theme, $base_root, $user;

Needs Sub Issue?

core/includes/install.core.inc:  // Load global $user and perform final login tasks.
core/includes/language.inc:    global $user;

Needs Sub Issue?

core/lib/Drupal/Core/Authentication/Provider/Cookie.php:    global $user;
core/lib/Drupal/Core/Entity/EntityAccessController.php:      $account = $GLOBALS['user'];
core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php:   * accessing the global $user.
core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php:    // access global $user in case language module enabled.
core/lib/Drupal/Core/Form/FormBuilder.php:        global $user;
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // The global $user object is included for backward compatibility only
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // @todo Remove this line once global $user is no longer used.
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        $GLOBALS['user'] = $anonymous_user;

Needs Sub Issue?

core/modules/content_translation/content_translation.module:      'uid' => $GLOBALS['user']->id(),
core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSyncImageTest.php:        'uid' => $GLOBALS['user']->id(),

Needs Sub Issue?

core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php:    global $user;
core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceSelectionSortTest.php:    $GLOBALS['user'] = $normal_user;

Needs Sub Issue?

core/modules/user/lib/Drupal/user/AccountFormController.php:        if ($GLOBALS['user']->isAuthenticated()) {
core/modules/user/lib/Drupal/user/Entity/User.php:        if ($this->id() == $GLOBALS['user']->id()) {
core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php:      if ($GLOBALS['user']->isAuthenticated() && !user_access('access site in maintenance mode')) {
core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php:    if ($GLOBALS['user']->isAuthenticated()) {
core/modules/user/lib/Drupal/user/EventSubscriber/MaintenanceModeSubscriber.php:        $event->setResponse(new RedirectResponse(url('user/' . $GLOBALS['user']->id() . '/edit', array('absolute' => TRUE))));
core/modules/user/lib/Drupal/user/Plugin/Action/CancelUser.php:    $this->tempStoreFactory->get('user_user_operations_cancel')->set($GLOBALS['user']->id(), $entities);
core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php: * Default argument plugin to extract the global $user
core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php:    global $user;
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php:        if ($argument == $GLOBALS['user']->id()) {
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php:          // real global $user object.
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php:          $account = clone $GLOBALS['user'];
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php:        $name = $GLOBALS['user']->getUserName() ?: \Drupal::config('user.settings')->get('anonymous');
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php:          $account = clone $GLOBALS['user'];
core/modules/user/lib/Drupal/user/RegisterFormController.php:    global $user;
core/modules/user/lib/Drupal/user/TempStoreFactory.php:      $owner = $GLOBALS['user']->id() ?: session_id();
core/modules/user/lib/Drupal/user/Tests/UserTokenReplaceTest.php:    $global_account = user_load($GLOBALS['user']->id());
core/modules/user/lib/Drupal/user/Tests/Views/ArgumentDefaultTest.php:    global $user;

Needs Sub Issue?

core/modules/user/user.install:  global $user;
core/modules/user/user.module: * Drupal has a global $user object, which represents the currently-logged-in
core/modules/user/user.module: * user. So to avoid confusion and to avoid clobbering the global $user object,
core/modules/user/user.module:  global $user;
core/modules/user/user.module:    // to the global $user. In all other cases the session key is preferred.
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  return $GLOBALS['user']->isAnonymous() || !empty($GLOBALS['menu_admin']);
core/modules/user/user.module:  return $GLOBALS['user']->isAuthenticated();
core/modules/user/user.module:    $uid = $GLOBALS['user']->id();
core/modules/user/user.module:  return empty($arg) || $arg == '%' ? $GLOBALS['user']->id() : $arg;
core/modules/user/user.module:  if ($GLOBALS['user']->isAnonymous()) {
core/modules/user/user.module: * The global $user object is replaced with the passed in account.
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  global $user;
core/modules/user/user.module:    global $user;
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  global $user;
core/modules/user/user.pages.inc:  global $user;
core/modules/user/user.tokens.inc:    $account = user_load($GLOBALS['user']->id());
core/modules/user/user.views_execution.inc:  global $user;

Needs Sub Issue?

core/scripts/generate-d7-content.sh:  $original_user = $GLOBALS['user'];
core/scripts/generate-d7-content.sh:    $GLOBALS['user'] = drupal_anonymous_user();// We should have already allowed anon to vote.
joelpittet’s picture

Issue summary: View changes
Xano’s picture

joelpittet’s picture

Issue summary: View changes

shuffling

joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes
joelpittet’s picture

Issue summary: View changes
xjm’s picture

Thanks for your work on this so far!

Rather than doing these in a zillion tiny patches, let's please remove as much as possible in one patch. Patches of less than 1K for the same change over and over again are more work for everyone, especially core maintainers. Only 40 references remain to global $user; (plus a bunch in comments) and the patch can easily be reviewed with git diff --color-words. We only need to worry about splitting up problems into sub-issues when the patch requires component-specific knowledge or when the patch that's going to be produced will be longer than a "one sitting" review (say more than 60-100K).

[tesla:drupal | Fri 07:42:33] $ grep -rl "global \$user" *
core/includes/bootstrap.inc
core/includes/install.core.inc
core/includes/language.inc
core/includes/session.inc
core/includes/theme.inc
core/lib/Drupal/Core/Authentication/AuthenticationManager.php
core/lib/Drupal/Core/Authentication/Provider/Cookie.php
core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
core/lib/Drupal/Core/Form/FormBuilder.php
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php
core/modules/contact/lib/Drupal/contact/MessageFormController.php
core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldWidget/AutocompleteWidgetBase.php
core/modules/filter/filter.module
core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
core/modules/system/lib/Drupal/system/Tests/Common/FormatDateTest.php
core/modules/system/lib/Drupal/system/Tests/Datetime/DrupalDateTimeTest.php
core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
core/modules/system/lib/Drupal/system/Tests/System/TokenReplaceTest.php
core/modules/user/lib/Drupal/user/Plugin/views/argument_default/CurrentUser.php
core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php
core/modules/user/lib/Drupal/user/RegisterFormController.php
core/modules/user/lib/Drupal/user/Tests/Views/ArgumentDefaultTest.php
core/modules/user/user.install
core/modules/user/user.module
core/modules/user/user.pages.inc
core/modules/user/user.views_execution.inc
xjm’s picture

So I closed a bunch as duplicates. We should have one patch that removes almost all references in #2163203: Remove calls to deprecated global $user wherever possible (outside bootstrap and authentication), possibly a separate one for changing TestBase's use, and then issues for authentication and session handling itself last.

xjm’s picture

xjm’s picture

Issue summary: View changes
joelpittet’s picture

@xjm there is a bit more with this grep:
grep -R -e "GLOBALS\['user'\]" -e "global .*\$user" *
Keep in mind some are written like:
global $theme, $user, $theme_key;

joelpittet’s picture

Issue summary: View changes
cosmicdreams’s picture

In reading the above an a handful of relative issues I couldn't find any reference to removing global $user from the user module. Has anyone tried that?

Looks like some of the same solutions done in the #2213899: Remove global $user wherever possible (outside bootstrap and authentication) Round 2 patch could be reused to remove the globals from user.

andypost’s picture

@cosmicdreams yes, and also some other files still needs issue or "part 3"

git grep -e "\$GLOBALS\['user'\]" -e 'global' --and -e '\$user'

core/scripts/generate-d7-content.sh:  $original_user = $GLOBALS['user'];
core/scripts/generate-d7-content.sh:    $GLOBALS['user'] = drupal_anonymous_user();// We should have already allowed anon to vote.
core/modules/user/user.module: * Drupal has a global $user object, which represents the currently-logged-in
core/modules/user/user.module: * user. So to avoid confusion and to avoid clobbering the global $user object,
core/modules/user/user.module: * The global $user object is replaced with the passed in account.
core/modules/user/user.module:  global $user;
core/modules/user/user.module:  global $user;
core/modules/system/src/Tests/Common/FormatDateTest.php:    global $user;
core/modules/system/src/Tests/Common/FormatDateTest.php:    // Disable session saving as we are about to modify the global $user.
core/modules/system/src/Tests/Datetime/DrupalDateTimeTest.php:    global $user;
core/modules/system/src/Tests/Datetime/DrupalDateTimeTest.php:    // Disable session saving as we are about to modify the global $user.
core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php:    if ($GLOBALS['user']->isAnonymous() && $exception instanceof AccessDeniedHttpException) {
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionHandler.php:    global $user;
core/lib/Drupal/Core/Session/SessionManagerInterface.php:   * dangerous operations, such as manipulating the global $user object.
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Session/SessionManager.php:    global $user;
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    global $user;
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    // The global $user object is included for backward compatibility only and
core/lib/Drupal/Core/Authentication/AuthenticationManager.php:    // @todo Remove this line once global $user is no longer used.
core/lib/Drupal/Core/Authentication/Provider/Cookie.php:    global $user;
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // The global $user object is included for backward compatibility only
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        // @todo Remove this line once global $user is no longer used.
core/lib/Drupal/Core/Routing/Enhancer/AuthenticationEnhancer.php:        $GLOBALS['user'] = $anonymous_user;
core/includes/bootstrap.inc:  global $user;

andypost’s picture

skipyT’s picture

Issue summary: View changes
skipyT’s picture

Issue summary: View changes
skipyT’s picture

Issue summary: View changes
skipyT’s picture

Issue summary: View changes

I updated the issue summary. Updated the child issues also.

We have still 3 places where the global user variable needs to be replaced: authentication manager, session and user module.
Also one remaining test.

Berdir’s picture

And all those places overlap and can not be changed separately. I started working on #2328645: Remove remaining global $user and closed all other remaining issues as duplicate of that.

Berdir’s picture

Status: Active » Closed (duplicate)

Actually, closing this one as a duplicate of that issue as well, there is nothing else left here.

I changed that one to a child issue of #2371629: [meta] Finalize Session and User Authentication API instead.

skipyT’s picture

@Berdir: and what about this issue: [2328645]. This was created for the remaining global $user in the other modules.

Berdir’s picture

@skipyT: That *is* the issue that I repurposed to deal with (almost) all remaining calls, see #53.