Removed duplicate

This commit is contained in:
Pierre HUBERT 2018-07-09 16:04:28 +02:00
parent f526893786
commit a90cde6268
2 changed files with 1 additions and 12 deletions

View File

@ -299,7 +299,7 @@ class GroupsController {
Rest_fatal_error(401, "You did not send a membership request to this group!");
//Try to cancel membership request
if(!components()->groups->cancelRequest(userID, $groupID))
if(!components()->groups->deleteRequest(userID, $groupID))
Rest_fatal_error(500, "An error occurred while trying to cancel membership request!");
return array("success" => "The request has been successfully cancelled!");

View File

@ -336,17 +336,6 @@ class GroupsComponent {
return $this->deleteMembershipWithStatus($userID, $groupID, GroupMember::PENDING);
}
/**
* Cancel a membership request
*
* @param int $userID The ID of the target user
* @param int $groupID The ID of the related group
* @return bool TRUE for a success / FALSE else
*/
public function cancelRequest(int $userID, int $groupID) : bool {
return $this->deleteMembershipWithStatus($userID, $groupID, GroupMember::PENDING);
}
/**
* Get the membership level of a user to a group
*