Fire the authenticated event if the dispatcher is set.

@param  \Illuminate\Contracts\Auth\Authenticatable $user

@return void
334219
protected function fireAuthenticatedEvent($user)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Authenticated($user));
        }
    }
1181406
public function updateAction(User $user)
    {
        $this->userService->updateUser($user);
        $this->addFlashMessage('Your user has been updated.', 'User updated', Message::SEVERITY_OK);
        $this->redirect('edit');
    }
872932
public function fire()
    {
        $this->laravel['auth.verification']->broker($this->argument('name'))->getRepository()->deleteExpired();
        $this->info('Expired verification tokens cleared!');
    }
406210
protected function fireBindingEvent($username, $password)
    {
        if (isset($this->events)) {
            $this->events->fire(new Binding($this->connection, $username, $password));
        }
    }
920582
public function isAllowed(Authenticatable $user = null): bool
    {
        $user = $user ?: Auth::user();

        foreach ($this->authorizationStack as $auth) {
            if (is_callable($auth)) {
                if (!$auth($user)) {
                    return false;
                }
            } elseif ($user && $user->cannot($auth)) {
                return false;
            }
        }

        return true;
    }
366943
public function be(UserContract $user, $driver = null)
    {
        $this->app['auth']->guard($driver)->setUser($user);
    }
324255
public function logout(Event $event, array $user)
    {
        $this->_init($event->subject()->request);
        Hybrid_Auth::logoutAllProviders();
    }
1264994
public function afterRegister($event, $user)
    {
        $sendMail = key_exists('sendMail', $event->data) ? $event->data['sendMail'] : true;
        if ($sendMail) {
            if (Configure::read('CM.ActivationOnRegister')) {
                $this->activation($user);
            }
        }
    }
700555
public function preUpdate(User $user, PreUpdateEventArgs $event)
    {
        if ($event->hasChangedField('password')) {
            $event->setNewValue('password', $this->encodePassword($user));
        }
    }
516314
protected function fireLoginEvent($user, $remember = FALSE)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Login($user, $remember));
        }
    }
212253
protected function fireLoginEvent($user, $remember = false)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Events\Login(
                $this->name, $user, $remember
            ));
        }
    }
527377
public function authenticated(Request $request, Contracts\RequiresEmailVerification $user)
    {
        if (config('verification.verify') && !$user->isUserEmailVerified()) {
            Auth::guard($this->getGuard())->logout();

            return redirect($this->verificationRedirectPath());
        }

        return redirect()->intended($this->redirectPath());
    }
429342
public function beforeSave(Event $event, User $user)
    {
        if (!$user->isNew() && $user->has('password') && empty($user->password)) {
            $user->unsetProperty('password');
            $user->dirty('password', false);
        }
    }
1332400
public function login(User $user)
    {
        // if not impersonated, save current logged in user
        // otherwise do not update (leave first original user in session)
        if (!$this->isActive()) {
            session()->put($this->originalUserKey, auth()->user()->id);
        }

        auth()->loginUsingId($user->id);

        session()->put($this->isActiveKey, true);
    }
1218572
public function fire()
    {
        $name = $this->ask('Please provide a username (defaults to admin)', 'admin');
        $email = $this->ask('Please provide your email (defaults to user@example.com)', 'user@example.com');
        $password = $this->ask('Please provide a password (defaults to password)', 'password');

        $authModel = config('auth.model');

        if (!get_class($authProvider = \Auth::getProvider()) === \Illuminate\Auth\EloquentUserProvider::class || !($authModel = $authProvider->getModel())) {
            $this->warn('To create a new admin user you must use Eloquent as your Auth Provider');

            return;
        }

        if ((new $authModel())->create(['name' => $name, 'email' => $email, 'password' => bcrypt($password)])) {
            $this->info('All done!');

            return;
        }

        $this->error('Something went wrong... Please try again.');
    }
368508
protected function fireCreatedEvent(Authenticatable $user, Token $token)
    {
        if ($this->createdEvent === null || !class_exists($this->createdEvent)) {
            return;
        }

        event(new $this->createdEvent($user, $token));
    }
1114009
public function login(UserInterface $user, $remember = false)
	{
		$this->updateSession($id = $user->getAuthIdentifier());

		// If the user should be permanently "remembered" by the application we will
		// queue a permanent cookie that contains the encrypted copy of the user
		// identifier. We will then decrypt this later to retrieve the users.
		if ($remember)
		{
			$this->queueRecallerCookie($id);
		}

		// If we have an event dispatcher instance set we will fire an event so that
		// any listeners will hook into the authentication events and run actions
		// based on the login and logout events fired from the guard instances.
		if (isset($this->events))
		{
			$this->events->fire('auth.login', array($user, $remember));
		}

		$this->setUser($user);
	}