@@ -204,7 +204,7 @@ public function cancelGroupRequest($send_mail = true)
204204 return ;
205205 }
206206
207- $ this ->SQL ->deleteGroupRequestByUserAndPI ($ this ->getOwner ()->getUID (), " admin " );
207+ $ this ->SQL ->removeRequest ($ this ->getOwner ()->getUID ());
208208
209209 if ($ send_mail ) {
210210 // send email to requestor
@@ -221,7 +221,7 @@ public function cancelGroupJoinRequest($user, $send_mail = true)
221221 return ;
222222 }
223223
224- $ this ->SQL ->deleteGroupRequestByUserAndPI ($ user ->getUID (), $ this ->pi_uid );
224+ $ this ->SQL ->removeRequest ($ user ->getUID (), $ this ->pi_uid );
225225
226226 if ($ send_mail ) {
227227 // send email to requestor
@@ -286,7 +286,7 @@ public function approveUser($new_user, $send_mail = true)
286286 $ this ->addUserToGroup ($ new_user );
287287
288288 // remove request, this will fail silently if the request doesn't exist
289- $ this ->removeRequest ($ new_user ->getUID ());
289+ $ this ->SQL -> removeRequest ($ new_user ->getUID (), $ this -> pi_uid );
290290
291291 // send email to the requestor
292292 if ($ send_mail ) {
@@ -318,7 +318,7 @@ public function denyUser($new_user, $send_mail = true)
318318 }
319319
320320 // remove request, this will fail silently if the request doesn't exist
321- $ this ->removeRequest ($ new_user ->getUID ());
321+ $ this ->SQL -> removeRequest ($ new_user ->getUID (), $ this -> pi_uid );
322322
323323 if ($ send_mail ) {
324324 // send email to the user
@@ -557,11 +557,6 @@ private function addRequest($uid)
557557 $ this ->SQL ->addRequest ($ uid , $ this ->pi_uid );
558558 }
559559
560- private function removeRequest ($ uid )
561- {
562- $ this ->SQL ->removeRequest ($ uid , $ this ->pi_uid );
563- }
564-
565560 //
566561 // Public helper functions
567562 //
0 commit comments