Can delete all the likes of a user

This commit is contained in:
Pierre 2018-05-09 14:52:07 +02:00
parent 334de7efe6
commit 3841d85c64

View File

@ -129,6 +129,23 @@ class Likes {
}
/**
* Delete all the likes of a user
*
* @param int $userID The ID of the target user
* @return bool TRUE for a success / FALSE else
*/
public function delete_all_user(int $userID) : bool {
//Delete on the database
return CS::get()->db->deleteEntry(
$this::LIKES_TABLE,
"ID_personne = ?",
array($userID)
);
}
}
//Register class