Skip to content

Commit

Permalink
Merge pull request civicrm#20498 from seamuslee001/fix_authx_drupal89
Browse files Browse the repository at this point in the history
[REF] Fix Authx tests on Druapl 8/9 by ensuring that we only return a…
  • Loading branch information
demeritcowboy authored Jun 4, 2021
2 parents c1f3628 + ea69a89 commit 94ef389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/authx/Civi/Authx/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function loginStateless($userId) {
*/
public function getCurrentUserId() {
$user = \Drupal::currentUser();
return $user ? $user->getAccount()->id() : NULL;
return $user && $user->getAccount()->id() ? $user->getAccount()->id() : NULL;
}

}

0 comments on commit 94ef389

Please sign in to comment.