10 months ago

Disabling auto login user after registration in Laravel 6

Posted 10 months ago by Mego

I am trying to disable auto login of fresh user, after registration. I found a function in trait /vendor/.....RegistersUsers.php on line 60


I don't think, that changing anything in vendor folder is good practise, so I tried to override protected function registered(...) in my app/http/controllers/auth/RegisterController.php

protected function registered(Request $request, $user) { event(new Registered($user));


But when I run this code, I receive the error

Argument 1 passed to App\Http\Controllers\Auth\RegisterController::registered() must be an instance of App\Http\Controllers\Auth\Request, instance of Illuminate\Http\Request given, called in C:\wamp\www\myproject\vendor\laravel\framework\src\Illuminate\Foundation\Auth\RegistersUsers.php on line 35

How can I disable this "feature"?

Please sign in or create an account to participate in this conversation.