mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Can cancel all the responses of a user to surveys.
This commit is contained in:
parent
791ebad4eb
commit
334de7efe6
@ -175,6 +175,20 @@ class SurveyComponent {
|
||||
array($surveyID, $userID));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel all the responses of a user
|
||||
*
|
||||
* @param int $userID The ID of the target user
|
||||
* @return bool TRUE for a success / FALSE else
|
||||
*/
|
||||
public function cancel_all_user_responses(int $userID) : bool {
|
||||
//Perform a request on the database
|
||||
return CS::get()->db->deleteEntry(
|
||||
$this::SURVEY_RESPONSE_TABLE,
|
||||
"ID_utilisateurs = ?",
|
||||
array($userID));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the survey associated to a post
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user