Fixed "remove member" bug
This commit is contained in:
1 parent
001559ed12
commit
6b7e7cd53b
1 file changed
+2
-2
@@ -358,8 +358,8 @@ class OrganisationMembersController extends SimpleController
|
||||
}
|
||||
|
||||
// Check if the user is a member of the organisation, pending or no relation at all
|
||||
$memberCheck = $organisation->members()->where('user_id', $currentUser->id)->withPivot('flag_approved')->first();
|
||||
$adminCheck = $organisation->administrators()->where('user_id', $currentUser->id)->withPivot('flag_approved')->first();
|
||||
$memberCheck = $organisation->members()->where('user_id', $user->id)->withPivot('flag_approved')->first();
|
||||
$adminCheck = $organisation->administrators()->where('user_id', $user->id)->withPivot('flag_approved')->first();
|
||||
if (!($memberCheck && $memberCheck->pivot->flag_approved) && !($adminCheck && $adminCheck->pivot->flag_approved)) {
|
||||
$ms->addMessageTranslated('danger', 'ORGANISATION.MEMBER.NOT_FOUND', [
|
||||
'name' => $organisation->name,
|
||||
|
||||
Reference in new issue
Block a user