Relying on entity queries to check access by default is deprecated in drupal:9.2.0

Created on 15 June 2023, about 1 year ago
Updated 25 July 2023, 11 months ago

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)

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇪Estonia hkirsman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024