public function checkBlacklistedRecipient($varValue, Contao\DataContainer $dc)
	{
		$objBlacklist = $this->Database->prepare("SELECT COUNT(*) AS count FROM tl_newsletter_blacklist WHERE hash=? AND pid=(SELECT pid FROM tl_newsletter_recipients WHERE id=?) AND id!=?")
									   ->execute(md5($varValue), $dc->id, $dc->id);

		if ($objBlacklist->count > 0)
		{
			throw new Exception($GLOBALS['TL_LANG']['ERR']['blacklisted']);
		}

		return $varValue;
	}
public function checkBlacklistedRecipient($varValue, Contao\DataContainer $dc)
	{
		$objBlacklist = $this->Database->prepare("SELECT COUNT(*) AS count FROM tl_newsletter_blacklist WHERE hash=? AND pid=(SELECT pid FROM tl_newsletter_recipients WHERE id=?) AND id!=?")
									   ->execute(md5($varValue), $dc->id, $dc->id);

		if ($objBlacklist->count > 0)
		{
			throw new Exception($GLOBALS['TL_LANG']['ERR']['blacklisted']);
		}

		return $varValue;
	}
public function checkBlacklistedRecipient ( $ varValue , Contao \ DataContainer $ dc ) { $ objBlacklist = $ this -> Database -> prepare ( "SELECT COUNT(*) AS count FROM tl_newsletter_blacklist WHERE hash=? AND pid=(SELECT pid FROM tl_newsletter_recipients WHERE id=?) AND id!=?" ) -> execute ( md5 ( $ varValue ) , $ dc -> id , $ dc -> id ) ; if ( $ objBlacklist -> count > 0 ) { throw new Exception ( $ GLOBALS [ 'TL_LANG' ] [ 'ERR' ] [ 'blacklisted' ] ) ; } return $ varValue ; }
Check if a recipient is blacklisted for a channel

@param mixed                $varValue
@param Contao\DataContainer $dc

@return mixed

@throws Exception
Check if a recipient is blacklisted for a channel