Create new users with Laravel 5.3

0

I ran the make: auth of laravel 5.3 but when I am creating new users I lose my session and the new user is logged in. Does anyone know how I can create a new user and stay signed in with my account?

    
asked by anonymous 17.11.2016 / 20:51

1 answer

1

You can disable this option within the framework's default log file:

MeuProjeto\vendor\laravel\framework\src\Illuminate\Foundation\Auth\RegistersUsers.php

This is the method that performs the registration:

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

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

        // Esta linha loga no usuário recém criado
        // Comente-a para não realizar o login
        $this->guard()->login($user);

        return $this->registered($request, $user)
            ?: redirect($this->redirectPath());
    }
    
20.11.2016 / 20:28