Fixes #2
This commit is contained in:
@@ -206,8 +206,6 @@ class OrganisationMembersController extends SimpleController
|
||||
|
||||
// Begin transaction - DB will be rolled back if an exception occurs
|
||||
Capsule::transaction(function () use ($organisation, $currentUser, $classMapper, $config) {
|
||||
$organisation->members()->detach($currentUser->id);
|
||||
|
||||
if ($config['organisation']['membership']['require_approval']) {
|
||||
// Find the mapping
|
||||
$tokenOwner = $classMapper->getClassMapping('organisation_member')::query()
|
||||
@@ -218,6 +216,8 @@ class OrganisationMembersController extends SimpleController
|
||||
$approval = $this->ci->repoOrganisationMembershipApproval->removeExisting($tokenOwner);
|
||||
}
|
||||
|
||||
$organisation->members()->detach($currentUser->id);
|
||||
|
||||
// Create activity record
|
||||
$this->ci->userActivityLogger->info("User {$currentUser->user_name} cancelled the request to join the organisation {$organisation->name}.", [
|
||||
'type' => 'organisation_join',
|
||||
|
||||
Reference in New Issue
Block a user