check user internal Id on membership
This commit is contained in:
parent
2a6da11842
commit
21d4b8feef
|
@ -916,7 +916,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status')
|
||||||
$user->setAttributes($dbForProject->getDocument('users', $userId)->getArrayCopy()); // Get user
|
$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') . ')');
|
throw new Exception(Exception::TEAM_INVITE_MISMATCH, 'Invite does not belong to current user (' . $user->getAttribute('email') . ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue