Sign in a user

@param Auth\User		$user
@param string			$keep_loggedin
@param string			$name				The auth instance
@return bool
192792
public static function sign_in( \Auth\User $user, $keep_loggedin = true, $name = null )
	{
		return Handler::create( $name )->sign_in( $user, $keep_loggedin );
	}
785500
public function verifyPassword(User $user, string $password): bool
    {
        $this->enforcePasswordStrength($password);

        $auth = $this->authenticationProvider->findByUserId($user->getId());
        if (!$auth) {
            throw new NoSuchUserException();
        }

        return password_verify($password, $auth->getHash());
    }
827923
public function actionPassword($user, $password)
    {
        $user = $this->getUser($user);
        $user->applyForNewPassword();
        $result = $user->resetPassword($password, $user->getPasswordResetToken());
        if ($result) {
            echo "Password changed.\n";
        } else {
            echo "Password not changed.\n";
        }
        return static::EXIT_CODE_NORMAL;
    }
454869
public function login(UserInterface $user, $firewallName = 'main')
    {
        $token = new UsernamePasswordToken($user, $user->getPassword(), $firewallName, $user->getRoles());
        $this->tokenStorage->setToken($token);

        return $user;
    }
587980
public function MakeLogin($user, $id)
	{
        $userObj = $this->getUsersDatabase()->getById($id);
        UserContext::getInstance()->registerLogin($userObj->toArray());
	}
128580
public function login(UserContract $user, $remember = false)
    {
        wp_set_auth_cookie($user->ID, $remember);

        wp_set_current_user($user->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.
        $this->fireLoginEvent($user, $remember);

        $this->setUser($user);
    }
136662
public function login(AuthenticatableContract $user, $remember = false)
    {
        $this->updateSession($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->ensureRememberTokenIsSet($user);

            $this->queueRecallerCookie($user);
        }

        // 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.
        $this->fireLoginEvent($user, $remember);

        $this->setUser($user);
    }
702694
public function validateLogoutRequest(LogoutRequest $request, User $user)
    {
        $this->validateIssuer($request);
        $this->validateNameId($request, $user);

        if ($this->hasSignature($request)) {
            $this->validateSignature(
                $request,
                KeyHelper::createPublicKey(
                    $this->getMetadata()->getFirstIdpSsoDescriptor()
                        ->getFirstKeyDescriptor(KeyDescriptor::USE_SIGNING)
                        ->getCertificate()
                )
            );
        }
    }
360785
public function create(User $user, $username, $password)
    {
        $this->authenticationService->create($user, $username, $password);
    }
1323635
public function loginLog(User $user, array $geoIp)
    {
        $geoIp['date'] = date('Y-m-d H:i:s');
        $loginIps = $user->getAttribute('lastLoginIps');

        if (!$loginIps) {
            $loginIps = [];
        }

        array_unshift($loginIps, $geoIp);
        $loginIps = array_slice($loginIps, 0, 3);

        $user->setAttribute('lastLoginIps', $loginIps);
        $this->dm->persist($user);
        $this->dm->flush();

        return $this;
    }
1174272
public function login($user, $password)
    {
        return $this->requestAndResponse('LOGIN', $this->escapeString($user, $password), true);
    }
131707
public function deleteUser(User $user, string $password) : bool {
		if ($user->doesPasswordMatch($password)) {
			$stmt = $this->db->prepare(
				"DELETE FROM accounts " .
				"WHERE id=? AND username=? AND email=?;"
			);
			$stmt->bind_param("iss",
				$user->id, $user->username, $user->email);
			$stmt->execute();
			$this->db->commit();
			return true;
		} else {
			return false;
		}
	}
470705
public static function login($user)
  {
    $token = $user->{config('auth.provider.' . Auth::$provider . '.with')} = Hash::random(70);
    $user->save();

    return Remember::login($token);
  }
723325
protected function verifyUser($user)
    {
        $user->verified = true;
        $user->verified_at = new Carbon('now');

        $user->save();

        Auth::guard($this->getGuard())->login($user);
    }
1246221
public function login($username_or_email = '', $password = '')
	{
		if ( ! ($this->user = $this->validate_user($username_or_email, $password)))
		{
			// force a logout
			$this->logout();

			// and signal a failed login
			return false;
		}

		// register so Auth::logout() can find us
		Auth::_register_verified($this);

		// store the logged-in user and it's hash in the session
		\Session::set('username', $this->user->username);
		\Session::set('login_hash', $this->create_login_hash());

		// and rotate the session id, we've elevated rights
		\Session::instance()->rotate();

		return true;
	}
81347
public function logUser(User $user)
    {
        // TODO : log in an EventListener on user log event instead
        $this->strictEventDispatcher->dispatch('log', 'Log\LogUserLogin', [$user]);

        // TODO : nope, we should let Symfony handles token creation
        $token = new UsernamePasswordToken($user, null, 'main', $user->getRoles());
        $this->tokenStorage->setToken($token);

        if (null === $user->getInitDate()) {
            $this->setUserInitDate($user);
        }
        $user->setLastLogin(new \DateTime());

        $this->objectManager->persist($user);
        $this->objectManager->flush();
    }
271542
protected function fireLoginEvent($user, $remember = false)
    {
        if (isset($this->events)) {
            $this->events->fire('auth.login', [$user, $remember]);
        }
    }