Problem/Motivation

On line 121 in user_delete_reassign.module we have entityQuery() that does not have accessCheck(). Upgrade Status gives this warning:

<code>Relying on entity queries to check access by default is deprecated in drupal:9.2.0 and an error will be thrown from drupal:10.0.0. Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck() with TRUE or FALSE to specify whether access should be checked.

Proposed resolution

Add

->accessCheck(TRUE)

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

I've opend MR for this. Only one line added.

dineshkumarbollu’s picture

StatusFileSize
new30.65 KB

Hi @hkirsman

I test the module for "Relying on entity queries to check access by default is deprecated in drupal:9.2.0", There is no issues related to Call \Drupal\Core\Entity\Query\QueryInterface::accessCheck().

Thanks

arjenk’s picture

Status: Active » Reviewed & tested by the community

Patch tested,

  • patch applies
  • patch fixes problem with accessCheck()