PHP Class Jrean\UserVerification\UserVerification

Afficher le fichier Open project: jrean/laravel-user-verification

Protected Properties

Свойство Type Description
$emailView string E-mail view name.
$mailer Illuminate\Contracts\Mail\Mailer Mailer instance.
$schema Illuminate\Database\Schema\Builder Schema builder instance.

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Mail\Mailer $mailer, Illuminate\Database\Schema\Builder $schema ) : void Create a new instance.
emailView ( string $name ) : Jrean\UserVerification Set the e-mail view name.
generate ( Illuminate\Contracts\Auth\Authenticatable $user ) : boolean Generate and save a verification token for the given user.
process ( string $email, string $token, string $userTable ) : void Process the user verification for the given e-mail and token.
send ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean Send by e-mail a link containing the verification token.
sendLater ( integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean Send later by e-mail a link containing the verification token.
sendLaterOn ( string $queue, integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean Send later on the given queue by e-mail a link containing the verification token.
sendQueue ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean Queue and send by e-mail a link containing the verification token.
sendQueueOn ( string $queue, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean Queue on the given queue and send by e-mail a link containing the verification token.

Méthodes protégées

Méthode Description
emailLaterOnVerificationLink ( $queue, integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject, string $from = null, string $name = null ) : mixed Prepare and send later on the given queue the e-mail with the verification token link.
emailLaterVerificationLink ( integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject, string $from = null, string $name = null ) : mixed Prepare and send later the e-mail with the verification token link.
emailQueueOnVerificationLink ( string $queue, Illuminate\Contracts\Auth\Authenticatable $user, string $subject, string $from = null, string $name = null ) : mixed Prepare and push a job onto the given queue to send the e-mail with the verification token link.
emailQueueVerificationLink ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject, string $from = null, string $name = null ) : mixed Prepare and push a job onto the queue to send the e-mail with the verification token link.
emailVerificationLink ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject, string $from = null, string $name = null ) : mixed Prepare and send the e-mail with the verification token link.
generateToken ( ) : string | boolean Generate the verification token.
getUserByEmail ( string $email, string $table ) : stdClass Get the user by e-mail.
hasColumn ( Illuminate\Contracts\Auth\Authenticatable $user, string $column ) : boolean Check if the given model talbe has the given column.
isCompliant ( Illuminate\Contracts\Auth\Authenticatable $user ) : boolean Determine if the given model table has the verified and verification_token columns.
isVerified ( stdClass $user ) : void Check if the given user is verified.
saveToken ( Illuminate\Contracts\Auth\Authenticatable $user, string $token ) : boolean Update and save the model instance with the verification token.
updateUser ( stdClass $user ) : void Update and save user object.
verifyToken ( string $storedToken, string $requestToken ) : void Compare the two given tokens.
wasVerified ( stdClass $user ) : void Update and save the given user as verified.

Method Details

__construct() public méthode

Create a new instance.
public __construct ( Illuminate\Contracts\Mail\Mailer $mailer, Illuminate\Database\Schema\Builder $schema ) : void
$mailer Illuminate\Contracts\Mail\Mailer
$schema Illuminate\Database\Schema\Builder
Résultat void

emailView() public méthode

Set the e-mail view name.
public emailView ( string $name ) : Jrean\UserVerification
$name string
Résultat Jrean\UserVerification

generate() public méthode

Generate and save a verification token for the given user.
public generate ( Illuminate\Contracts\Auth\Authenticatable $user ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
Résultat boolean

generateToken() protected méthode

Generate the verification token.
protected generateToken ( ) : string | boolean
Résultat string | boolean

getUserByEmail() protected méthode

Get the user by e-mail.
protected getUserByEmail ( string $email, string $table ) : stdClass
$email string
$table string
Résultat stdClass

hasColumn() protected méthode

Check if the given model talbe has the given column.
protected hasColumn ( Illuminate\Contracts\Auth\Authenticatable $user, string $column ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$column string
Résultat boolean

isCompliant() protected méthode

Determine if the given model table has the verified and verification_token columns.
protected isCompliant ( Illuminate\Contracts\Auth\Authenticatable $user ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
Résultat boolean

isVerified() protected méthode

Check if the given user is verified.
protected isVerified ( stdClass $user ) : void
$user stdClass
Résultat void

process() public méthode

Process the user verification for the given e-mail and token.
public process ( string $email, string $token, string $userTable ) : void
$email string
$token string
$userTable string
Résultat void

saveToken() protected méthode

Update and save the model instance with the verification token.
protected saveToken ( Illuminate\Contracts\Auth\Authenticatable $user, string $token ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$token string
Résultat boolean

send() public méthode

Send by e-mail a link containing the verification token.
public send ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$subject string
$from string
$name string
Résultat boolean

sendLater() public méthode

Send later by e-mail a link containing the verification token.
public sendLater ( integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean
$seconds integer
$user Illuminate\Contracts\Auth\Authenticatable
$subject string
$from string
$name string
Résultat boolean

sendLaterOn() public méthode

Send later on the given queue by e-mail a link containing the verification token.
public sendLaterOn ( string $queue, integer $seconds, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean
$queue string
$seconds integer
$user Illuminate\Contracts\Auth\Authenticatable
$subject string
$from string
$name string
Résultat boolean

sendQueue() public méthode

Queue and send by e-mail a link containing the verification token.
public sendQueue ( Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$subject string
$from string
$name string
Résultat boolean

sendQueueOn() public méthode

Queue on the given queue and send by e-mail a link containing the verification token.
public sendQueueOn ( string $queue, Illuminate\Contracts\Auth\Authenticatable $user, string $subject = null, string $from = null, string $name = null ) : boolean
$queue string
$user Illuminate\Contracts\Auth\Authenticatable
$subject string
$from string
$name string
Résultat boolean

updateUser() protected méthode

Update and save user object.
protected updateUser ( stdClass $user ) : void
$user stdClass
Résultat void

verifyToken() protected méthode

Compare the two given tokens.
protected verifyToken ( string $storedToken, string $requestToken ) : void
$storedToken string
$requestToken string
Résultat void

wasVerified() protected méthode

Update and save the given user as verified.
protected wasVerified ( stdClass $user ) : void
$user stdClass
Résultat void

Property Details

$emailView protected_oe property

E-mail view name.
protected string $emailView
Résultat string

$mailer protected_oe property

Mailer instance.
protected Mailer,Illuminate\Contracts\Mail $mailer
Résultat Illuminate\Contracts\Mail\Mailer

$schema protected_oe property

Schema builder instance.
protected Builder,Illuminate\Database\Schema $schema
Résultat Illuminate\Database\Schema\Builder