Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
fixed wrong typehint
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Jul 11, 2020
1 parent 51aad2a commit a80935e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Helper/AcceptPoliciesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ public function getActivePolicies(): array
/**
* Helper method to determine acceptance / confirmation states for current user.
*/
private function determineAcceptanceState(int $uid = null, string $modVarName = ''): bool
private function determineAcceptanceState(int $uid = null, string $modVarName = ''): ?string
{
$acceptanceState = false;
$acceptanceState = null;

if (null !== $uid && !empty($uid) && is_numeric($uid) && $uid > 0) {
if ($uid > Constant::USER_ID_ADMIN) {
/** @var UserEntity $user */
$user = $this->userRepository->find($uid);
$acceptanceState = $user->getAttributes()->containsKey($modVarName) ? $user->getAttributeValue($modVarName) : false;
$acceptanceState = $user->getAttributes()->containsKey($modVarName) ? $user->getAttributeValue($modVarName) : null;
} else {
// The special users (uid == UsersConstant::USER_ID_ADMIN or UsersConstant::USER_ID_ANONYMOUS) have always accepted all policies.
$now = new \DateTime('now', new DateTimeZone('UTC'));
Expand Down

0 comments on commit a80935e

Please sign in to comment.