public static function decline_contact_request(int $userid, int $requesteduserid) {
        global $DB;

        if ($request = $DB->get_record('message_contact_requests', ['userid' => $userid,
                'requesteduserid' => $requesteduserid])) {
            $DB->delete_records('message_contact_requests', ['id' => $request->id]);
        }
    }
public static function decline_contact_request(int $userid, int $requesteduserid) {
        global $DB;

        if ($request = $DB->get_record('message_contact_requests', ['userid' => $userid,
                'requesteduserid' => $requesteduserid])) {
            $DB->delete_records('message_contact_requests', ['id' => $request->id]);
        }
    }
public static function decline_contact_request ( int $ userid , int $ requesteduserid ) { global $ DB ; if ( $ request = $ DB -> get_record ( 'message_contact_requests' , [ 'userid' => $ userid , 'requesteduserid' => $ requesteduserid ] ) ) { $ DB -> delete_records ( 'message_contact_requests' , [ 'id' => $ request -> id ] ) ; } }
Handles declining a contact request.

@param int $userid The id of the user who created the contact request
@param int $requesteduserid The id of the user declining the request
Handles declining a contact request .