Skip to content
Snippets Groups Projects
Unverified Commit 94ef3890 authored by DaveD's avatar DaveD Committed by GitHub
Browse files

Merge pull request #20498 from seamuslee001/fix_authx_drupal89

[REF] Fix Authx tests on Druapl 8/9 by ensuring that we only return a…
parents c1f3628f ea69a893
Branches
Tags
No related merge requests found
......@@ -54,7 +54,7 @@ class Drupal8 implements AuthxInterface {
*/
public function getCurrentUserId() {
$user = \Drupal::currentUser();
return $user ? $user->getAccount()->id() : NULL;
return $user && $user->getAccount()->id() ? $user->getAccount()->id() : NULL;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment