Skip to content

Commit

Permalink
Merge pull request #55 from silinternational/develop
Browse files Browse the repository at this point in the history
Add default value for agreedToTerms
  • Loading branch information
mtompset authored Jul 12, 2022
2 parents b1da6e3 + 68be4dd commit 78f93f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SilMock/Google/Service/Directory/UsersResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilMock\Google\Service\Directory;

use DateTime;
use Google_Service_Directory_Alias as Alias;
use Google_Service_Directory_Aliases;
use SilMock\DataStore\Sqlite\SqliteUtils;
Expand Down Expand Up @@ -154,14 +155,16 @@ protected function getAllDbUsers()
*/
public function insert($postBody)
{
$currentDateTime = new DateTime('now');
$defaults = array(
'id' => str_replace(array(' ', '.'), '', microtime()),
'suspended' => false,
'changePasswordAtNextLogin' => false,
'isAdmin' => false,
'isDelegatedAdmin' => false,
'lastLoginTime' => time(),
'creationTime' => time(),
'lastLoginTime' => $currentDateTime->format('c'),
'creationTime' => $currentDateTime->format('c'),
'agreedToTerms' => false,
);

// array_merge will not work, since $postBody is an object which only
Expand Down

0 comments on commit 78f93f5

Please sign in to comment.