Skip to content

Commit

Permalink
Merge pull request #80 from silinternational/feature/fix-2sv-field-da…
Browse files Browse the repository at this point in the history
…ta-types

Use boolean default values for isEnforcedIn2Sv and isEnrolledIn2Sv
  • Loading branch information
forevermatt authored May 7, 2024
2 parents 9a62002 + 8c138a0 commit 9710970
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SilMock/Google/Service/Directory/UsersResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ public function insert($postBody)
'lastLoginTime' => $currentDateTime->format('c'),
'creationTime' => $currentDateTime->format('c'),
'agreedToTerms' => false,
'isEnforcedIn2Sv' => 'false',
'isEnrolledIn2Sv' => 'false',
'isEnforcedIn2Sv' => false,
'isEnrolledIn2Sv' => false,
);

// array_merge will not work, since $postBody is an object which only
Expand Down Expand Up @@ -256,10 +256,10 @@ public function update($userKey, $postBody)
}
}
if (!isset($dbUserProps['isEnforcedIn2Sv'])) {
$dbUserProps['isEnforcedIn2Sv'] = 'false';
$dbUserProps['isEnforcedIn2Sv'] = false;
}
if (!isset($dbUserProps['isEnrolledIn2Sv'])) {
$dbUserProps['isEnrolledIn2Sv'] = 'false';
$dbUserProps['isEnrolledIn2Sv'] = false;
}

// Delete the user's old aliases before adding the new ones
Expand Down

0 comments on commit 9710970

Please sign in to comment.