src/Service/Emailer.php
public function userHasUnsubscribed($iUSerId, $sType)
    {
        $oDb = Factory::service('Database');
        $oDb->where('user_id', $iUSerId);
        $oDb->where('type', $sType);
        return (bool) $oDb->count_all_results(NAILS_DB_PREFIX . 'user_email_blocker');
    }
public function userHasUnsubscribed($iUSerId, $sType)
    {
        $oDb = Factory::service('Database');
        $oDb->where('user_id', $iUSerId);
        $oDb->where('type', $sType);
        return (bool) $oDb->count_all_results(NAILS_DB_PREFIX . 'user_email_blocker');
    }
public function userHasUnsubscribed ( $ iUSerId , $ sType ) { $ oDb = Factory :: service ( 'Database' ) ; $ oDb -> where ( 'user_id' , $ iUSerId ) ; $ oDb -> where ( 'type' , $ sType ) ; return ( bool ) $ oDb -> count_all_results ( NAILS_DB_PREFIX . 'user_email_blocker' ) ; }
Determines whether the user has unsubscribed from this email type

@param  int    $iUSerId The user ID to check for
@param  string $sType   The type of email to check against

@return boolean
@throws \Nails\Common\Exception\FactoryException
Determines whether the user has unsubscribed from this email type