josiasmontag / laravel-email-verification Goto Github PK
View Code? Open in Web Editor NEWLaravel package to handle user verification using an activation mail
License: MIT License
Laravel package to handle user verification using an activation mail
License: MIT License
Hey now,
Perhaps making the verification email notification queue-able is a good idea?
Hi,
$this->app->make('Lunaweb\EmailVerification\EmailVerification')->sendVerifyLink($user);
does not do anything, no errors, no emails sent.
Sending emails (via mailgun) is all set up and working.
What am I missing?
Hi there,
Nice package. if you have the time you could add the ability to verify email for multi-auth system.
either way if you have any pointers on how to go about it, that would be great. thanks.
I am going to integrate email verification with React and I need to implement the sending email verification API.
$this->app->make('Lunaweb\EmailVerification\EmailVerification')->sendVerifyLink($user);
so, when I run this code, it occurs error.
Illuminate\Auth\RequestGuard::getDispatcher does not exist
I think this error is coming from service provider (Auth::getDispatcher())
$this->app->singleton(\Lunaweb\EmailVerification\EmailVerification::class, function ($app) {
return new EmailVerification(
Auth::getProvider(),
Auth::getDispatcher(),
config('app.key'),
config('emailverification.expire', 1440)
);
});
My laravel version is 5.6.x
Route register/verify/resend redirects not verified user to /home page.
Is it possible to move the views and language files (after published) outside the vendor folders created?
for instance, i'd like to move the view file to the views/auth folder and the language files to: lang/$LANG/emailverification.php
is this possible?
UserVerified event should be fired only first time when user opens activation link.
I have followed your instructions and complement the steps. I have laravel 5.5
when I click the register in my views, I get
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_RECOVERABLE_ERROR)
Type error: Argument 1 passed to Lunaweb\EmailVerification\EmailVerification::createToken() must
be an instance of Lunaweb\EmailVerification\Contracts\CanVerifyEmail, instance of App\User given,
called in /Users/sam/site/vendor/josiasmontag/laravel-email-verification/src/EmailVerification.php
on line 127
when I check my database the user values gets insert into the user table. What might be the cause.
Laravel 5.5
In your readme.md file you override default Controller to custom Lunaweb\User\Http\Controllers\Controller in file RegisterController.php. Why?
use Lunaweb\EmailVerification\Traits\VerifiesEmail;
use Lunaweb\User\Http\Controllers\Controller;
class RegisterController extends Controller
{
use RegistersUsers, VerifiesEmail;
public function __construct()
{
$this->middleware('guest', ['except' => ['verify', 'showResendVerificationEmailForm', 'resendVerificationEmail']]);
$this->middleware('auth', ['only' => ['showResendVerificationEmailForm', 'resendVerificationEmail']]);
}
// ...
}
And that Controller not found)))
never mind :))
basically, i can simply keep pressing the resend button or create a script to do so and abuse the mail service.
After run:
php artisan vendor:publish --provider="Lunaweb\EmailVerification\Providers\EmailVerificationServiceProvider" --tag="views"
Any view files are copied. Can someone check this?
separate and create a function to contain the validate method only, this will allow us to override it at the register controller and implement any other validation required, in my case, captcha.
i noticed that when trying to reclick the link at the email, the update query still gets executed perhaps detecting if the user is already verified instead will be better.
class User extends Authenticatable implements CanVerifyEmailContract, PlanSubscriberInterface
{
ErrorException (E_WARNING)
Declaration of Lunaweb\EmailVerification\Traits\CanVerifyEmail::sendEmailVerificationNotification($token, $expiration) should be compatible with Illuminate\Foundation\Auth\User::sendEmailVerificationNotification()
Any idea what its all about?
can you upload the whole package, i am new to laravel so it a lot confusing for me,
Can I implement CanVerifyEmailContract on model Comment? I need do email verification for comments system. When guest create comment, he can write email, name, and body of comment. When guest send comment, I need verify email him.
Hi, thanks ๐ for this great package, very useful and is working good.
I've a case use where I'm inviting people to this laravel application via email and my boss asked me to skip the verification if the user has been invited via email since he already clicked on the "Accept Invite" button on the email so it's kind of already verified.
I've tried to modify the SendUserVerificationMail which is responsable to listen for Registered events and send the email to this:
if (Session::has('invite_token')) {
$event->user->forceFill([
'verified' => true
])->save();
} else {
if (config('emailverification.listen_registered_event', true)) {
$sent = resolve('Lunaweb\EmailVerification\EmailVerification')->sendVerifyLink($event->user);
Session::flash($sent == EmailVerification::VERIFY_LINK_SENT ? 'success' : 'error', trans($sent));
}
}
in hope of make it working and skip the isEmailVerified middleware but unfortunatelly is not working and still goes to the verification resend page but with the message "You are already verified" since I changed the verified flag on the user profile after a good registration.
Any idea about how I can archive this result? basically in this particular case I need to skip the email verification.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.