Skip to content
Snippets Groups Projects
Commit ea69a893 authored by Seamus Lee's avatar Seamus Lee
Browse files

[REF] Fix Authx tests on Druapl 8/9 by ensuring that we only return an id for...

[REF] Fix Authx tests on Druapl 8/9 by ensuring that we only return an id for the user id if it is greater than 0
parent 72c28dd4
No related branches found
No related tags found
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