From 4d1bd33920c6ccdc57ff0c9b1d700324fa2a49c1 Mon Sep 17 00:00:00 2001 From: divya-intelli Date: Thu, 28 Jul 2022 14:47:30 +0530 Subject: [PATCH] Fix for deprecation:Relying on entity queries to check access by default --- apigee_edge.install | 1 + apigee_edge.module | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apigee_edge.install b/apigee_edge.install index bb2da528f..3a95a095d 100644 --- a/apigee_edge.install +++ b/apigee_edge.install @@ -39,6 +39,7 @@ function apigee_edge_requirements($phase) { if (!InstallerKernel::installationAttempted()) { $missing_mails = \Drupal::entityQuery('user') ->notExists('mail') + ->accessCheck(TRUE) ->condition('uid', '0', '<>') ->execute(); if (!empty($missing_mails)) { diff --git a/apigee_edge.module b/apigee_edge.module index ddba9a3dd..db800137c 100644 --- a/apigee_edge.module +++ b/apigee_edge.module @@ -1670,7 +1670,7 @@ function apigee_edge_developer_app_storage_load(array $entities) { // anyway but one by one. With this we warm up the user entity cache and // User::load() will return all users from cache. $userStorage = \Drupal::entityTypeManager()->getStorage('user'); - $uids = $userStorage->getQuery()->condition('mail', $dev_id_mail_map, 'IN')->execute(); + $uids = $userStorage->getQuery()->accessCheck(TRUE)->condition('mail', $dev_id_mail_map, 'IN')->execute(); $users = $userStorage->loadMultiple($uids); if ($dev_id_mail_map) {