1
0
Fork 0
mirror of synced 2024-07-06 15:11:21 +12:00

check user internal Id on membership

This commit is contained in:
Damodar Lohani 2024-03-18 09:01:54 +00:00
parent 2a6da11842
commit 21d4b8feef

View file

@ -916,7 +916,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
$user->setAttributes($dbForProject->getDocument('users', $userId)->getArrayCopy()); // Get user
}
if ($membership->getAttribute('userId') !== $user->getId()) {
if ($membership->getAttribute('userInternalId') !== $user->getInternalId()) {
throw new Exception(Exception::TEAM_INVITE_MISMATCH, 'Invite does not belong to current user (' . $user->getAttribute('email') . ')');
}