Drupal 7, avoid load drupal user blocked in bootstrap
authorRubén Pineda <r.pineda@ixiam.com>
Tue, 9 May 2023 16:23:11 +0000 (18:23 +0200)
committerGitHub <noreply@github.com>
Tue, 9 May 2023 16:23:11 +0000 (18:23 +0200)
This block the possibility to execute the rest API with blocked drupal users

CRM/Utils/System/Drupal.php

index a645c8b722642f48e6faf7c8bd7dbbcb896b21fd..ebb1a37b79a624ed827baeb8f04785c2ce5a88a3 100644 (file)
@@ -538,7 +538,7 @@ AND    u.status = 1
 
     if ($uid) {
       $account = user_load($uid);
-      if ($account && $account->uid) {
+      if ($account && $account->uid && $account->status) {
         global $user;
         $user = $account;
         return TRUE;