1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

Fixed tests

This commit is contained in:
Matej Baco 2022-02-04 17:10:52 +01:00
parent 7a128fb7cc
commit d3e8e5ff21
4 changed files with 7 additions and 1 deletions

View file

@ -989,7 +989,7 @@ $collections = [
'format' => '',
'size' => 256,
'signed' => true,
'required' => true,
'required' => false,
'default' => 'bcrypt',
'array' => false,
'filters' => [],

View file

@ -507,6 +507,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
'emailVerification' => true,
'status' => true, // Email should already be authenticated by OAuth2 provider
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
'hash' => 'bcrypt',
'passwordUpdate' => 0,
'registration' => \time(),
'reset' => false,
@ -682,6 +683,7 @@ App::post('/v1/account/sessions/magic-url')
'emailVerification' => false,
'status' => true,
'password' => null,
'hash' => 'bcrypt',
'passwordUpdate' => \time(),
'registration' => \time(),
'reset' => false,
@ -953,6 +955,7 @@ App::post('/v1/account/sessions/anonymous')
'emailVerification' => false,
'status' => true,
'password' => null,
'hash' => 'bcrypt',
'passwordUpdate' => \time(),
'registration' => \time(),
'reset' => false,
@ -1451,6 +1454,7 @@ App::patch('/v1/account/email')
try {
$user = $dbForProject->updateDocument('users', $user->getId(), $user
->setAttribute('password', $isAnonymousUser ? Auth::passwordHash($password, $hash) : $user->getAttribute('password', ''))
->setAttribute('hash', $isAnonymousUser ? $hash : $user->getAttribute('hash', ''))
->setAttribute('email', $email)
->setAttribute('emailVerification', false) // After this user needs to confirm mail again
->setAttribute('search', implode(' ', [$user->getId(), $user->getAttribute('name'), $user->getAttribute('email')]))

View file

@ -325,6 +325,7 @@ App::post('/v1/teams/:teamId/memberships')
'emailVerification' => false,
'status' => true,
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
'hash' => 'bcrypt',
/**
* Set the password update time to 0 for users created using
* team invite and OAuth to allow password updates without an

View file

@ -64,6 +64,7 @@ App::post('/v1/users')
'emailVerification' => false,
'status' => true,
'password' => $import ? $password : Auth::passwordHash($password, $hash),
'hash' => $hash,
'passwordUpdate' => \time(),
'registration' => \time(),
'reset' => false,