GET User.

@param int $id User ID
510037
public function getAction($id)
    {
        if (!$this->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new InsufficientAuthenticationException('You must be authenticated to delete users');
        }

        $user = $this->getEntityManager()->find(get_class($this->getUser()), $id);

        if (!$user) {
            return $this->create404Response(sprintf('User not found with id %d', $id));
        }

        if (!$this->isGranted('VIEW', $user)) {
            throw new InsufficientAuthenticationException(sprintf('You are not authorized to view user with id %s', $id));
        }

        return new Response($this->formatItem($user), 200, ['Content-Type' => 'application/json']);
    }
685597
public function hasUser($id)
    {
        if ($id instanceof Eloquent) $id = $id->getKey();

        return $this->users->contains('id', $id);
    }
404152
public function userGet(int $user_id)
    {
        $value = get_user_meta($user_id, $this->getName(), true);

        if (! empty($value)) {
            $this->setValue($value);
        }
    }
1136160
public function getUserById($id)
    {
        return $this->apiCall('users.info', [
            'user' => $id,
        ])->then(function (Payload $response) {
            return new User($this, $response['user']);
        });
    }
1293258
public function getUserDetails($id)
    {
        $user = new User();
        $user->setDb($this->di->get("db"));
        $user->find("id", $id);
        return $user;
    }
429381
public function getPersonById($id)
    {
        $id = (int) $id;
        $id = max(0, $id);

        return $this->request('people/'.$id);
    }
565340
public function resolveUserFunction($id)
    {
        if ($this->cache->contains($id)) {
            return $this->cache->fetch($id);
        }

        $user = $this->userRepository->findUserById($id);
        if (null === $user) {
            return;
        }

        $this->cache->save($id, $user);

        return $user;
    }
1197770
public function get($id)
    {
        $idName = ucfirst($this->idProperty->getName());
        return $this->__call("getBy$idName", array($id));
    }
273111
public function onceUsingId($id)
    {
        $this->setUser($this->provider->retrieveById($id));

        return $this->user instanceof UserContract;
    }
586679
public function getResponse($id)
	{
		foreach ($this->_responses as $response)
			if ($response->id == $id)
				return $response;

		return null;
	}
1015361
public function get($id)
    {
        if (isset($this->objects[$id])) {
            return $this->objects[$id];
        } else {
            return false;
        }
    }
424449
public function setUserId(int $id)
    {

        // Has the id changed?
        if ($id !== $this->userId) {
            // Invalidate existing user
            if ($this->user !== null && $this->user->getId() !== $id) {
                $this->user = null;
            };

            $this->userId = $id;
        }

        return $this;
    }
659471
public function getUser($id = 0)
    {
        $auth = false;

        if ($id === 0 && isset($this->_accesstoken)) {
            $id = 'self';
            $auth = true;
        }

        return $this->_makeCall('users/' . $id, $auth);
    }
1009848
public function setId(?int $id): User
    {
        Assert::greaterThan($id, 0);

        $this->id = $id;

        return $this;
    }
634700
public User getUserById(int id) {
		for (User u : users)
			if (u.getId() == id)
				return u;
		return null;
	}
215541
public function offsetGet($id)
    {
        $value = parent::offsetGet($id);

        if (is_object($value)) {
            $this->initialize($value);
        }

        return $value;
    }
1208207
public function iHaveUserWithId( $id )
    {
        $name = $this->findNonExistingUserName();
        $user = $this->getUserManager()->ensureUserExists( $name );
        $this->addValuesToKeyMap( $id, $user->id );
    }