1
0
Fork 0
mirror of synced 2024-05-07 22:32:44 +12:00

Merge pull request #4776 from appwrite/fix-team-invite-verification-main

Fix: unsaved changes in team invitation
This commit is contained in:
Christy Jacob 2022-11-24 19:18:47 +05:30 committed by GitHub
commit 30eda18ac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,5 @@
- Fix invited account verified status [#4776](https://github.com/appwrite/appwrite/pull/4776)
# Version 1.1.2
## Changes
- Released `appwrite/console` [2.0.2](https://github.com/appwrite/console/releases/tag/2.0.2)

View file

@ -724,7 +724,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
->setAttribute('confirm', true)
;
$user->setAttribute('emailVerification', true);
$user = Authorization::skip(fn() => $dbForProject->updateDocument('users', $user->getId(), $user->setAttribute('emailVerification', true)));
// Log user in

View file

@ -342,6 +342,15 @@ trait TeamsBaseClient
$session = $this->client->parseCookie((string)$response['headers']['set-cookie'])['a_session_' . $this->getProject()['$id']];
$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 */
/**