<?
class lc_pm_ignore_list
{
	function __construct()
	{
		$this->user_id=User::i()->id;
	}
	
	public function addToIgnore($user_id)
	{
		Db::i()->query("INSERT IGNORE INTO ?_lc_pm_ignore (user_id, ignore_id) VALUES(?, ?)", $this->user_id, $user_id);
	}
	
	public function removeFromIgnore($user_id)
	{
		Db::i()->query("DELETE FROM ?_lc_pm_ignore WHERE user_id=? AND ignore_id=?", $this->user_id, $user_id);
	}
	
	public function getIgnoreList()
	{
		return Db::i()->selectCol("SELECT ignore_id AS ARRAY_KEY, login FROM ?_lc_pm_ignore i JOIN ?_users u ON i.ignore_id=u.user_id WHERE i.user_id=?", $this->user_id);
	}
}