Add the passed credentials in the database.

@param string|UserInformation $user The username to remove.

@return UserProviderFromConfig
420129
public function removeUser($user)
    {
        $username = ($user instanceof UserInformation) ? $user->getUsername() : (string) $user;

        $this->configSource->set('auth-password/' . $username, null);

        return $this;
    }
701028
public function removeUser(User $user)
    {
        if ($this->users->contains($user)) {
            $this->users->removeElement($user);
        }

        return $this;
    }
1320824
public function setUser($user)
    {
        if (\is_object($user)) {
            $this->userObject = $user;
            $this->user       = $user->getId();
        } else {
            $this->userObject = null;
            $this->user       = $user;
        }

        return $this;
    }
1129072
public final function withUserInfo($user, $password = null): UriInterface
   {
       return $this->with(
           "user",
           $user . ($password ? static::HOST_SEPARATOR . $password: ""));
   }
239660
public function make($user)
    {
        $RagnarokUser = new SecUser();
        $this->userRagnarok = $RagnarokUser->populate($user);
        Session::put($this->getName(), $this->userRagnarok);
        return $this->userRagnarok;
    }
648151
public function user(string $user): Builder
    {
        $this->claims[Claims::USER] = $user;

        return $this;
    }
1099209
protected function insert($user, $provider, $userProfile)
    {
        $zfcUserOptions = $this->getZfcUserOptions();

        // If user state is enabled, set the default state value
        if ($zfcUserOptions->getEnableUserState()) {
            if ($zfcUserOptions->getDefaultUserState()) {
                $user->setState($zfcUserOptions->getDefaultUserState());
            }
        }

        $options = array(
            'user'          => $user,
            'provider'      => $provider,
            'userProfile'   => $userProfile,
        );

        $this->getEventManager()->trigger('registerViaProvider', $this, $options);
        $result = $this->getZfcUserMapper()->insert($user);
        $this->getEventManager()->trigger('registerViaProvider.post', $this, $options);

        return $result;
    }
1360274
public function addUser(\Haven\SecurityBundle\Entity\User $users)
    {
        $this->users[] = $users;
    
        return $this;
    }
1049924
public function updateUser(User $user)
    {
        try {
            return $this->innerGateway->updateUser($user);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
562577
public static function setUserInfo($user)
    {
        if (!empty($user)) {
            \Session::put('user.id', array_get($user, 'id'));
            \Session::put('user.name', array_get($user, 'name'));
            \Session::put('user.username', array_get($user, 'username'));
            \Session::put('user.display_name', array_get($user, 'name'));
            \Session::put('user.first_name', array_get($user, 'first_name'));
            \Session::put('user.last_name', array_get($user, 'last_name'));
            \Session::put('user.email', array_get($user, 'email'));
            \Session::put('user.is_sys_admin', array_get($user, 'is_sys_admin'));
            \Session::put('user.last_login_date', array_get($user, 'last_login_date'));
            \Session::put('user.ldap_username', array_get($user, 'ldap_username'));

            return true;
        }

        return false;
    }
1050431
public function forUser($user)
    {
        return new static(
            $this->container,
            function () use ($user) {
                return $user;
            },
            $this->abilities,
            $this->policies,
            $this->beforeCallbacks
        );
    }
755429
public function setUser(\Core\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }
377596
public function setUser(string $user)
    {
        $this->user = $user;

        $this->raw = array_merge($this->raw, ['User' => $user]);

        return $this;
    }
154105
public function setUser($user)
    {
        $this->removeTarget();

        if ($user) {
            $this->user = (string) $user;
        }

        return $this;
    }
1068672
public function addUser(User $user)
    {
        if (!$this->users->contains($user)) {
            $this->users->add($user);
        }

        return $this;
    }
433680
public function withUserInfo($user, $password = null): self
    {
        $user_info = null;
        $user = $this->filterString($user);
        if (null !== $password) {
            $password = $this->filterString($password);
        }

        if ('' !== $user) {
            $user_info = $this->formatUserInfo($user, $password);
        }

        if ($user_info === $this->user_info) {
            return $this;
        }

        $clone = clone $this;
        $clone->user_info = $user_info;
        $clone->authority = $clone->setAuthority();
        $clone->assertValidState();

        return $clone;
    }
393550
protected function setAuthorizer($user)
	{
		if($user !== false && $this->authorizer !== null && $user instanceof AuthorizableInterface)
		{
			$user->setAuthorizer($this->authorizer);
		}

		return $user;
	}