Let's start to convert all calls to user_access() with the new AccountInterface::hasPermission() method.

Part of #2048171: [meta] Replace user_access() calls with $account->hasPermission() wherever possible.

Change records for this issue:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

InternetDevels’s picture

Status: Active » Needs review
FileSize
915 bytes

Here is the patch.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/tracker/tracker.module
@@ -171,7 +171,7 @@ function tracker_cron() {
+  return $account->id() && ($GLOBALS['user']->id() == $account->id()) && $account->hasPermission('access content');

Global $user conversion is out of scope, so great

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.