RainLab\User\Models\MailBlocker::checkForEmail PHP Метод

checkForEmail() публичный статический Метод

Checks if an email address has blocked a given template, returns an array of blocked emails.
public static checkForEmail ( string $template, string $email ) : array
$template string
$email string
Результат array
    public static function checkForEmail($template, $email)
    {
        if (in_array($template, static::$safeTemplates)) {
            return [];
        }
        if (empty($email)) {
            return [];
        }
        if (!is_array($email)) {
            $email = [$email => null];
        }
        $emails = array_keys($email);
        return static::where(function ($q) use($template) {
            $q->where('template', $template)->orWhere('template', '*');
        })->whereIn('email', $emails)->lists('email');
    }