0

I want to prevent login after registration & I know its very easy & simple. By commenting single line we can do that. But my concern is I don't want to do this in Vendor's file.

    public function register(Request $request)
    {
        $this->validator($request->all())->validate();

        event(new Registered($user = $this->create($request->all())));

        // $this->guard()->login($user);

        return $this->registered($request, $user)
            ?: redirect($this->redirectPath());
    } 
theduck
  • 2,589
  • 13
  • 17
  • 23
Shivam Verma
  • 905
  • 1
  • 8
  • 20
  • 2
    Possible duplicate of [Laravel 5.4 - Disable auto login after registration](https://stackoverflow.com/questions/43226145/laravel-5-4-disable-auto-login-after-registration) – fmsthird Oct 17 '19 at 06:12
  • 1
    Just write this function in your `app/Http/Controllers/Auth/RegisterController.php` as per your need. – Dhaval Purohit Oct 17 '19 at 07:28

0 Answers0