laravel - Disabled user / Validation Email -


i've added column (is_activated) in user db add verification email in registration process.

i follow tutorial: tutorial

it works user not activated can bypass login function using reset password form.

how can resolve problem?

you should create middleware , redirect not activated users home page, example:

public function handle($request, closure $next) {      if (!auth()->user()->is_activated) {         return redirect('/');     }      return $next($request); } 

then register middleware , apply non public routes route::group()


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -