Fixed tests
This commit is contained in:
parent
7a128fb7cc
commit
d3e8e5ff21
4 changed files with 7 additions and 1 deletions
|
@ -989,7 +989,7 @@ $collections = [
|
||||||
'format' => '',
|
'format' => '',
|
||||||
'size' => 256,
|
'size' => 256,
|
||||||
'signed' => true,
|
'signed' => true,
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'default' => 'bcrypt',
|
'default' => 'bcrypt',
|
||||||
'array' => false,
|
'array' => false,
|
||||||
'filters' => [],
|
'filters' => [],
|
||||||
|
|
|
@ -507,6 +507,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
|
||||||
'emailVerification' => true,
|
'emailVerification' => true,
|
||||||
'status' => true, // Email should already be authenticated by OAuth2 provider
|
'status' => true, // Email should already be authenticated by OAuth2 provider
|
||||||
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
|
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
|
||||||
|
'hash' => 'bcrypt',
|
||||||
'passwordUpdate' => 0,
|
'passwordUpdate' => 0,
|
||||||
'registration' => \time(),
|
'registration' => \time(),
|
||||||
'reset' => false,
|
'reset' => false,
|
||||||
|
@ -682,6 +683,7 @@ App::post('/v1/account/sessions/magic-url')
|
||||||
'emailVerification' => false,
|
'emailVerification' => false,
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'password' => null,
|
'password' => null,
|
||||||
|
'hash' => 'bcrypt',
|
||||||
'passwordUpdate' => \time(),
|
'passwordUpdate' => \time(),
|
||||||
'registration' => \time(),
|
'registration' => \time(),
|
||||||
'reset' => false,
|
'reset' => false,
|
||||||
|
@ -953,6 +955,7 @@ App::post('/v1/account/sessions/anonymous')
|
||||||
'emailVerification' => false,
|
'emailVerification' => false,
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'password' => null,
|
'password' => null,
|
||||||
|
'hash' => 'bcrypt',
|
||||||
'passwordUpdate' => \time(),
|
'passwordUpdate' => \time(),
|
||||||
'registration' => \time(),
|
'registration' => \time(),
|
||||||
'reset' => false,
|
'reset' => false,
|
||||||
|
@ -1451,6 +1454,7 @@ App::patch('/v1/account/email')
|
||||||
try {
|
try {
|
||||||
$user = $dbForProject->updateDocument('users', $user->getId(), $user
|
$user = $dbForProject->updateDocument('users', $user->getId(), $user
|
||||||
->setAttribute('password', $isAnonymousUser ? Auth::passwordHash($password, $hash) : $user->getAttribute('password', ''))
|
->setAttribute('password', $isAnonymousUser ? Auth::passwordHash($password, $hash) : $user->getAttribute('password', ''))
|
||||||
|
->setAttribute('hash', $isAnonymousUser ? $hash : $user->getAttribute('hash', ''))
|
||||||
->setAttribute('email', $email)
|
->setAttribute('email', $email)
|
||||||
->setAttribute('emailVerification', false) // After this user needs to confirm mail again
|
->setAttribute('emailVerification', false) // After this user needs to confirm mail again
|
||||||
->setAttribute('search', implode(' ', [$user->getId(), $user->getAttribute('name'), $user->getAttribute('email')]))
|
->setAttribute('search', implode(' ', [$user->getId(), $user->getAttribute('name'), $user->getAttribute('email')]))
|
||||||
|
|
|
@ -325,6 +325,7 @@ App::post('/v1/teams/:teamId/memberships')
|
||||||
'emailVerification' => false,
|
'emailVerification' => false,
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
|
'password' => Auth::passwordHash(Auth::passwordGenerator(), 'bcrypt'),
|
||||||
|
'hash' => 'bcrypt',
|
||||||
/**
|
/**
|
||||||
* Set the password update time to 0 for users created using
|
* Set the password update time to 0 for users created using
|
||||||
* team invite and OAuth to allow password updates without an
|
* team invite and OAuth to allow password updates without an
|
||||||
|
|
|
@ -64,6 +64,7 @@ App::post('/v1/users')
|
||||||
'emailVerification' => false,
|
'emailVerification' => false,
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'password' => $import ? $password : Auth::passwordHash($password, $hash),
|
'password' => $import ? $password : Auth::passwordHash($password, $hash),
|
||||||
|
'hash' => $hash,
|
||||||
'passwordUpdate' => \time(),
|
'passwordUpdate' => \time(),
|
||||||
'registration' => \time(),
|
'registration' => \time(),
|
||||||
'reset' => false,
|
'reset' => false,
|
||||||
|
|
Loading…
Reference in a new issue