Retrieve an authenticating user

get '/users/self'

Returns a single authenticating user, according to the authentication credentials provided

@param array $options Additional request's options.

@return array Resource object.
9078
public function self(array $options = array())
  {
    list($code, $resource) = $this->httpClient->get("/users/self", null, $options);
    return $resource;
  }
475673
public function UserGet(AuthUserGetRequest $argument,
                            $metadata = [], $options = [])
    {
        return $this->_simpleRequest('/etcdserverpb.Auth/UserGet',
            $argument,
            ['\Etcdserverpb\AuthUserGetResponse', 'decode'],
            $metadata, $options);
    }
309305
public function retrieveByCredentials(array $credentials)
    {
        $userService = app()->make(UserService::class);
        $user = $userService->byCredentials($credentials)->get();

        if (! $user) {
            return null;
        }

        return $user;
    }
867051
public static function getUsers()
	{
		if ( ! is_array( self::$auth ) ) throw new Exception( 'Authentication not initialized' );

		if ( isset( self::$auth['users'] ) ) {
			return self::$auth['users'];
		} else {
			return array();
		}
	}
1097492
public function login($options = []) {
		$options = Hash::merge($this->getConfig('login'), $options);
		$this->_handleUserBeingAlreadyLoggedIn($options);
		$entity = $this->UserTable->newEntity(null, ['validate' => false]);

		if ($this->_getRequest()->is('post')) {
			$user = $this->_beforeLogin($entity, $options);
			if ($user) {
				return $this->_afterLogin($user, $options);
			} else {
				$this->handleFlashAndRedirect('error', $options);
			}
		}

		if ($options['setEntity']) {
			$this->_setViewVar('userEntity', $entity);
		}

		return false;
	}
1286673
public function getTips(array $options = array())
    {

        $uri = $this->buildUserResourceUri('tips');
        $response = $this->makeAuthenticatedApiRequest($uri, $options);

        return $response->tips->items;

    }
1044086
public function get($endpoint, $options = [])
    {
        return $this->request('GET', 'rest/v1/users/' . $this->userId . '/' . $endpoint . '?' . http_build_query($options));
    }
72414
protected function getLoginCredential($credentials = array())
	{
		$loginField = $this->app['config']['auth.credentials.login'];

		if (isset($credentials[$loginField]))
		{
			return $credentials[$loginField];
		}
		else if (Input::has($loginField))
		{
			return Input::get($loginField);
		}
		else if (isset($credentials['user_login']))
		{
			return $credentials['user_login'];
		}
		else if (isset($credentials['log']))
		{
			return $credentials['log'];
		}

		throw new InvalidArgumentException("Login field not found");

	}
1152043
public function getCheckins(array $options = array())
    {

        $uri = $this->buildUserResourceUri('checkins');
        $response = $this->makeAuthenticatedApiRequest($uri, $options);

        return $response->checkins->items;

    }
682365
private function login($options = []) {
        extract($options);
        if ($this->request->is('post')) {
            $this->User = TableRegistry::get($table);
            $query = $this->User->find('all');
            $query->where([$username => trim($this->request->data['username'])]);

            if ($md5_hashing)
                $query->where([$password => md5($this->request->data['password'])]);
            else
                $query->where([$password => trim($this->request->data['password'])]);

            $user = $query->first();
            if ($user) {
                $this->request->session()->write('User.id', $user->id);
                return $this->redirect($login_redirect);
            } else {
                $this->Flash->set(__('Username or password is incorrect!'), ['element' => 'error']);
            }
        }
    }
283741
public function resources($options = [])
    {
        $url = $this->getBaseUrl();
        $resources = $this->request($url, $options);

        return $resources;
    }
1252462
public function getUser()
    {
        if ($user = $this->provider->user()) {
            return ($field = $this->field) ? (string) $user->{$field} : $user->getAuthIdentifier();
        }
    }
1014329
public function getProfileUser($accessToken = null, array $options = [])
    {
        if (null === $accessToken) {
            $options['access_token'] = $this->blizzardClient->getAccessToken();
        } else {
            $options['access_token'] = $accessToken;
        }

        return $this->request('/profile/user', $options);
    }
1067844
public function getVenueHistory(array $options = array())
    {

        $uri = $this->buildUserResourceUri('venuehistory');
        $response = $this->makeAuthenticatedApiRequest($uri);

        return $response->venues->items;

    }
325078
public function verifyEmailToken($options = []) {
		$options = Hash::merge(
			$this->getConfig('verifyEmailToken'),
			$options,
			['type' => 'Email']
		);

		return $this->verifyToken($options);
	}
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
983221
public function fetchUser($id, array $options = [])
    {
        $data = [
            '_id' => $id
        ];

        $response = $this->kuzzle->query(
            $this->buildQueryArgs('getUser'),
            $data,
            $options
        );

        return new User($this, $response['result']['_id'], $response['result']['_source'], $response['result']['_meta']);
    }