Primo Committ
This commit is contained in:
50
vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
vendored
Normal file
50
vendor/laravel/framework/src/Illuminate/Auth/MustVerifyEmail.php
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Auth;
|
||||
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
|
||||
trait MustVerifyEmail
|
||||
{
|
||||
/**
|
||||
* Determine if the user has verified their email address.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasVerifiedEmail()
|
||||
{
|
||||
return ! is_null($this->email_verified_at);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the given user's email as verified.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function markEmailAsVerified()
|
||||
{
|
||||
return $this->forceFill([
|
||||
'email_verified_at' => $this->freshTimestamp(),
|
||||
])->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the email verification notification.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sendEmailVerificationNotification()
|
||||
{
|
||||
$this->notify(new VerifyEmail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the email address that should be used for verification.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEmailForVerification()
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user