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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -