mirror of
				https://github.com/pierre42100/ComunicAPI
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	Can delete all the likes of a user
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user