mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-12-25 13:08:58 +00:00
Can delete all the likes of a user
This commit is contained in:
parent
334de7efe6
commit
3841d85c64
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user