Skip to content
Snippets Groups Projects
Commit bccd3ac4 authored by catch's avatar catch
Browse files

Issue #3498909 by benjifisher: Clean up code in UserRolesCacheContext::getContext()

parent c0163e1d
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,8 @@ public function getContext($role = NULL) {
if ($role === NULL) {
return implode(',', $this->user->getRoles());
}
else {
return (in_array($role, $this->user->getRoles()) ? 'true' : 'false');
}
return in_array($role, $this->user->getRoles(), TRUE) ? 'true' : 'false';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment