Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • Accounts
  • Actions
  • ApiKeys
  • Backup
  • CalendarEvents
  • ClientGroups
  • Clients
  • Companies
  • Contacts
  • Countries
  • Coupons
  • CouponTerms
  • CronTasks
  • Currencies
  • EmailGroups
  • Emails
  • EmailVerifications
  • Encryption
  • GatewayManager
  • Invoices
  • InvoiceTemplateManager
  • Languages
  • Logs
  • Marketplace
  • MessageGroups
  • Messages
  • MessengerManager
  • ModuleClientMeta
  • ModuleManager
  • ModuleTypes
  • Navigation
  • PackageGroups
  • PackageOptionGroups
  • PackageOptions
  • Packages
  • Payments
  • Permissions
  • PluginManager
  • Pricings
  • ReportManager
  • ServiceChanges
  • ServiceInvoices
  • Services
  • Settings
  • Staff
  • StaffGroups
  • States
  • SystemEvents
  • Taxes
  • Themes
  • Transactions
  • Users
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class EmailVerifications

Email Verifications management

Model
Extended by AppModel uses Blesta\Core\Util\Common\Traits\Container
Extended by EmailVerifications
Package: blesta\app\models
Copyright: Copyright (c) 2020, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/email_verifications.php
Methods summary
public
# __construct( )

Initialize EmailVerifications

Initialize EmailVerifications

Overrides

AppModel::__construct()
public mixed
# get( integer $verification_id )

Fetches the given email verification

Fetches the given email verification

Parameters

$verification_id
The ID of the email verification to fetch

Returns

mixed

A stdClass object containing the email verification information, false if no such email verification exists

public array
# getAll( array $filters = [] )

Fetches all the email verifications on the system

Fetches all the email verifications on the system

Parameters

$filters

A list of parameters to filter by, including:

  • contact_id The ID of the contact on which to filter email verifications
  • email The email address on which to filter email verifications
  • verified The status type of the email verification to fetch (optional, default null) one of the following:
    • 1 Fetch only verified rows
    • 0 Fetch only unverified rows
    • null Fetch all rows
  • date_sent

Returns

array
An array of stdClass objects containing the email verification information
public mixed
# getByToken( string $token )

Fetches the given email verification by their token

Fetches the given email verification by their token

Parameters

$token
The token of the email verification to fetch

Returns

mixed

A stdClass object containing the email verification information, false if no such email verification exists

public mixed
# getByContactId( integer $contact_id )

Fetches the latest email verification by their contact ID

Fetches the latest email verification by their contact ID

Parameters

$contact_id
The ID of the contact on which to fetch the latest email verification

Returns

mixed

A stdClass object containing the email verification information, false if no such email verification exists

public integer
# add( array $vars, boolean $send = true )

Creates a new email verification using the given data

Creates a new email verification using the given data

Parameters

$vars

An array of invoice data including:

  • contact_id The ID of the contact to verify
  • email The email address to verify
  • token The email verification token (optional, If not given a token will be automatically generated)
  • verified Whether or not the email it's verified, (optional, 0 by default)
  • redirect_url The url to redirect after a successfully verification
$send
Whether or not to send the verification email to the client (optional, true by default)

Returns

integer
The email verification ID, void on error
public integer
# edit( integer $verification_id, array $vars )

Updates an email verification using the given data

Updates an email verification using the given data

Parameters

$verification_id
The ID of the email verification to update
$vars

An array of invoice data including:

  • contact_id The ID of the contact to verify
  • email The email address to verify
  • token The email verification token
  • verified Whether or not the email it's verified
  • redirect_url The url to redirect after a successfully verification

Returns

integer
The email verification ID, void on error
public
# delete( integer $verification_id )

Permanently removes an email verification from the system

Permanently removes an email verification from the system

Parameters

$verification_id
The ID of the email verification to delete
public
# deleteAll( integer $contact_id )

Permanently removes all email verifications from a specific contact

Permanently removes all email verifications from a specific contact

Parameters

$contact_id
The ID of the contact to delete all verifications
public
# verify( integer $verification_id )

Verifies an email address

Verifies an email address

Parameters

$verification_id
The ID of the email verification to set as verified
public string
# generateToken( string $email )

Generates a new token based on the given email address

Generates a new token based on the given email address

Parameters

$email
The email address to generate a verification token

Returns

string
The verification token
public
# send( integer $verification_id )

Sends the email verification link

Sends the email verification link

Parameters

$verification_id
The ID of the email verification link to send
Methods inherited from AppModel
_(), boolToInt(), currencyToDecimal(), dateToUtc(), errors(), getPerPage(), ifSet(), loadCrypto(), setDefaultIfEmpty(), setPerPage(), setRulesIfSet(), strToBool(), systemDecrypt(), systemEncrypt(), systemHash(), truncateDecimal(), validateExists(), validateStateCountry()
Methods used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Properties inherited from AppModel
$logger, $replacement_keys
Blesta API documentation generated by ApiGen