Merge pull request #4776 from appwrite/fix-team-invite-verification-main
Fix: unsaved changes in team invitation
This commit is contained in:
commit
30eda18ac1
|
@ -1,3 +1,5 @@
|
||||||
|
- Fix invited account verified status [#4776](https://github.com/appwrite/appwrite/pull/4776)
|
||||||
|
|
||||||
# Version 1.1.2
|
# Version 1.1.2
|
||||||
## Changes
|
## Changes
|
||||||
- Released `appwrite/console` [2.0.2](https://github.com/appwrite/console/releases/tag/2.0.2)
|
- Released `appwrite/console` [2.0.2](https://github.com/appwrite/console/releases/tag/2.0.2)
|
||||||
|
|
|
@ -724,7 +724,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
|
||||||
->setAttribute('confirm', true)
|
->setAttribute('confirm', true)
|
||||||
;
|
;
|
||||||
|
|
||||||
$user->setAttribute('emailVerification', true);
|
$user = Authorization::skip(fn() => $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('emailVerification', true)));
|
||||||
|
|
||||||
// Log user in
|
// Log user in
|
||||||
|
|
||||||
|
|
|
@ -342,6 +342,15 @@ trait TeamsBaseClient
|
||||||
$session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']];
|
$session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']];
|
||||||
$data['session'] = $session;
|
$data['session'] = $session;
|
||||||
|
|
||||||
|
$response = $this->client->call(Client::METHOD_GET, '/account', array_merge([
|
||||||
|
'origin' => 'http://localhost',
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session,
|
||||||
|
]));
|
||||||
|
|
||||||
|
$this->assertEquals(true, $response['body']['emailVerification']);
|
||||||
|
|
||||||
|
|
||||||
/** [START] TESTS TO CHECK PASSWORD UPDATE OF NEW USER CREATED USING TEAM INVITE */
|
/** [START] TESTS TO CHECK PASSWORD UPDATE OF NEW USER CREATED USING TEAM INVITE */
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue