Returns an associative array with the data about the user.
Fields array described in the method setFields

@example <code>
$this->getUser();
</code>

@return array|bool|mixed data provided by the ISP login
496945
public function getUser()
    {

        // destroy previous content
        $this->destroyUserData();

        if ($this->user === false) {

            // get user

            $url = 'http://ulogin.ru/token.php?token=' . $this->getToken() . '&host=' . (new Request())->getHttpHost();
            $content = file_get_contents($url);
            $this->user = json_decode($content, true);

            // if use has error , destroy user data
            if ($this->destroyUserData() === true) {
                $this->logout();
            }
        }

        return $this->user;
    }
477687
private function getAdminUserAttributes()
    {
        $attributes = [
            'username'     => 'admin',
            'first_name'   => 'Super',
            'last_name'    => 'ADMIN',
            'email'        => env('ADMIN_EMAIL',    'admin@example.com'),
            'password'     => env('ADMIN_PASSWORD', 'password'),
            'is_admin'     => true,
            'activated_at' => $now = now(),
        ];

        if (UserConfirmator::isEnabled())
            $attributes['confirmed_at'] = $now;

        return $attributes;
    }
36339
public function getUserByField($field, $data)
    {
        $user = new User();
        $userVarArray = get_object_vars($user);
        $arrayKeys = array_keys($userVarArray);
        $userData = $this->userStorage->getUserByField($field, $data);
        if (empty($userData)) {
            return $user;
        }
        foreach ($arrayKeys as $key) {
            $user->{$key} = $userData->$key;
        }
        return $user;
    }
958358
public static function getCurrentUser() {
    $email = UserServiceUtil::getUserEnvironmentVariable('USER_EMAIL');
    $userId = UserServiceUtil::getUserEnvironmentVariable('USER_ID');
    $federatedIdentity =
        UserServiceUtil::getUserEnvironmentVariable('FEDERATED_IDENTITY');
    $federatedProvider =
        UserServiceUtil::getUserEnvironmentVariable('FEDERATED_PROVIDER');

    if (!$email && !$federatedIdentity) {
      return null;
    }

    if (!$federatedIdentity) {
      $federatedIdentity = null;
    }

    if (!$federatedProvider) {
      $federatedProvider = null;
    }

    // We set this to maintain compatibility with the
    // datastore_types.FromPropertyPb creation of a User object, which will set
    // an empty string for the email (since it is a required field of the
    // underlying data representation of this class in the datastore.
    if ($email === false) {
      $email = '';
    }

    // User.user_id() should only return a
    // string of length > 0 or null.
    if (!$userId || $userId == '') {
      $userId = null;
    }

    return new User($email, $federatedIdentity, $federatedProvider, $userId);
  }
794694
public function adm_get_safe_user_data() {
		if (!$this->store_is_logged_in())
			return [AdminStoreError::USER_NOT_LOGGED_IN];
		$data = $this->user_data;
		foreach (['upass', 'usalt', 'sid', 'token', 'expire'] as $key)
			unset($data[$key]);
		return [0, $data];
	}
994804
protected function getUserString() : string
    {
        $result = 'System';

        $userFields = [
            'name',
            'username',
            'email',
        ];

        $currentUser = User::getCurrentUser();
        if (empty($currentUser) || !is_array($currentUser)) {
            return $result;
        }

        foreach ($userFields as $field) {
            if (!empty($currentUser[$field])) {
                return $currentUser[$field];
            }
        }

        return $result;
    }
1321209
public function getMetadataForUser()
    {
        $reflection = new ReflectionClass($this->userClass);
        $properties = $reflection->getProperties();
        $metadata = [
            ClassMetadata::LOGIN_PROPERTY       => null,
            ClassMetadata::PASSWORD_PROPERTY    => null,
            ClassMetadata::API_KEY_PROPERTY     => null,
            ClassMetadata::LAST_ACTION_PROPERTY => null,
        ];

        foreach ($properties as $reflectionProperty) {
            foreach (['login', 'password', 'apiKey', 'lastAction'] as $annotation) {
                $class = sprintf('Ma27\\ApiKeyAuthenticationBundle\\Annotation\\%s', ucfirst($annotation));
                $annotationObject = $this->reader->getPropertyAnnotation($reflectionProperty, $class);

                if (!$annotationObject) {
                    continue;
                }

                switch ($annotation) {
                    case 'login':
                        $this->assertUnique($metadata[ClassMetadata::LOGIN_PROPERTY]);
                        $metadata[ClassMetadata::LOGIN_PROPERTY] = $reflectionProperty;
                        break;
                    case 'password':
                        $this->assertUnique($metadata[ClassMetadata::PASSWORD_PROPERTY]);
                        $metadata[ClassMetadata::PASSWORD_PROPERTY] = $reflectionProperty;
                        break;
                    case 'apiKey':
                        $this->assertUnique($metadata[ClassMetadata::API_KEY_PROPERTY]);
                        $metadata[ClassMetadata::API_KEY_PROPERTY] = $reflectionProperty;
                        break;
                    case 'lastAction':
                        $this->assertUnique($metadata[ClassMetadata::LAST_ACTION_PROPERTY]);
                        $metadata[ClassMetadata::LAST_ACTION_PROPERTY] = $reflectionProperty;
                        break;
                }

                if ($this->isMetadataFullyLoaded($metadata)) {
                    break 2;
                }
            }
        }

        if (!$metadata[ClassMetadata::LOGIN_PROPERTY] || !$metadata[ClassMetadata::PASSWORD_PROPERTY] || !$metadata[ClassMetadata::API_KEY_PROPERTY]) {
            throw new \LogicException('A user class must have a "Login", "Password", "ApiKey" annotation!');
        }

        return $metadata;
    }
1287648
public function getRequestUser()
    {
        if ($this->requestUser === null) {
            $token = $this->getRequestApiToken();
            if ($token === '') {
                $this->requestUser = 'no-token';
            } else {
                $ip = $this->app->make('ip');
                if ($ip->isBanned()) {
                    $this->requestUser = 'banned';
                } else {
                    $requestUser = null;
                    $list = new UserList();
                    $list->disableAutomaticSorting();
                    $list->filterByAttribute('api_token', $token);
                    $ids = $list->getResultIDs();
                    if (!empty($ids)) {
                        $u = \User::getByUserID($ids[0]);
                        if ($u->isRegistered()) {
                            $requestUser = $u;
                        }
                    }
                    if ($requestUser === null) {
                        $this->requestUser == 'invalid-token';
                        $ip->logSignupRequest();
                        if ($ip->signupRequestThreshholdReached()) {
                            $ip->createIPBan();
                        }
                    } else {
                        $this->requestUser = $requestUser;
                    }
                }
            }
        }
        if ($this->requestUser === 'no-token') {
            throw AccessDeniedException::create(t('API Access Token required'));
        }
        if ($this->requestUser === 'banned') {
            throw AccessDeniedException::create($this->app->make('ip')->getErrorMessage());
        }
        if ($this->requestUser === 'invalid-token') {
            throw AccessDeniedException::create(t('Bad API Access Token'));
        }

        return $this->requestUser;
    }
545029
public function getData()
    {
        $this->setDefaults();

        $this->validate(
            'partner',
            '_input_charset',
            'refund_date',
            'batch_no',
            'refund_items'
        );

        $this->validateOne(
            'seller_user_id',
            'seller_email'
        );

        $this->setBatchNum(count($this->getRefundItems()));
        $this->setRefundDetail($this->getDetailData());

        $data = [
            'service'        => $this->service,
            'partner'        => $this->getPartner(),
            'notify_url'     => $this->getNotifyUrl(),
            'seller_user_id' => $this->getPartner(),
            'refund_date'    => $this->getRefundDate(),
            'batch_no'       => $this->getBatchNo(),
            'batch_num'      => $this->getBatchNum(),
            'detail_data'    => $this->getDetailData(),
            '_input_charset' => $this->getInputCharset(),
        ];

        $data['sign'] = $this->sign($data, $this->getSignType());
        $data['sign_type'] = $this->getSignType();

        return $data;
    }
1230001
public function getActiveUsers()
    {
        $result = $this->getUsers();
        if ( $result->isSuccess() ) {
            $data = array();
            foreach ($result->data as $obj) {
                /** @var \Harvest\Model\User $obj */
                if ( $obj->get("is-active") == "true" ) {
                    $data[$obj->id] = $obj;
                }
            }
            $result->data = $data;
        }

        return $result;
    }
727738
final public function get_user_array(Array $additional_fields = array())
	{
		$user = array(
			'email'        => $this->get_email(),
			'screen_name'  => $this->get_screen_name(),
			'groups'       => $this->get_groups(),
		);

		$additional_fields = array_merge($this->config['additional_fields'], $additional_fields);
		foreach($additional_fields as $af)
		{
			// only works if it actually can be fetched through a get_ method
			if (is_callable(array($this, $method = 'get_'.$af)))
			{
				$user[$af] = $this->$method();
			}
		}
		return $user;
	}
775524
public function getUserData()
    {
        // Don't crash if not using yii\web\User
        if (!Yii::$app->has('user') || !isset(Yii::$app->user->id))
        {
            return null;
        }

        return [
            'id' => Yii::$app->user->id,
        ];
    }
892588
public function get_users() : array {
        $users = [];
        foreach ($this->userids as $userid) {
            if ($user = \core_user::get_user($userid)) {
                $users[] = $user;
            }
        }

        return $users;
    }
215820
public function createUser() {
        $data = array();

        foreach ($this->userFields as $base => $field) {
            $data[$field] = $this->getFieldInput($base);
        }

        $model = ClassRegistry::init($this->usersModel);
        $model->create();
        $model->save($data, false);

        $this->config = $data;
        $this->user = $model->find('first', array(
            'conditions' => array($model->alias . '.' . $model->primaryKey => $model->id),
            'recursive' => -1
        ));

        return $model->id;
    }
741671
public function getConfig(): array
    {
        $config = ['user' => null, 'profile_picture_field' => null];

        $token = $this->tokenStorage->getToken();
        if (!$token instanceof TokenInterface) {
            return $config;
        }

        $user = $token->getUser();
        if ($user instanceof UserInterface) {
            $apiUser = $user->getAPIUser();
            $config['user'] = $apiUser;
            $config['profile_picture_field'] = $this->resolveProfilePictureField($apiUser);
        }

        return $config;
    }
1041861
private function getUser()
    {
        $user = [];
        $user_area = $this->_parser->find('.table-recently-updated', 0);
        if ($user_area) {
            foreach ($user_area->find('tr') as $each_user) {
                if (!$each_user->find('td', 0)->find('div', 0)) {
                    continue;
                }

                $temp_user = [];

                $username_area = $each_user->find('td', 0);

                $temp_user['image'] = $this->getUserImage($username_area);
                $temp_user['username'] = $this->getUsername($username_area);
                $temp_user['score'] = $this->getUserScore($each_user);
                $temp_user['status'] = $this->getUserStatus($each_user);

                if ($this->_type == 'anime') {
                    $temp_user['episode'] = $this->getUserProgress($each_user, 3);
                    $temp_user['date'] = $this->getUserDate($each_user, 4);
                } else {
                    $temp_user['volume'] = $this->getUserProgress($each_user, 3);
                    $temp_user['chapter'] = $this->getUserProgress($each_user, 4);
                    $temp_user['date'] = $this->getUserDate($each_user, 5);
                }

                $user[] = $temp_user;
            }
        }

        return $user;
    }
1058462
public function getUserList()
    {
        // Tell LazyJsonMapper to give us all of our internal data as an array.
        // NOTE: This creates a COPY of the array. It's not attached to the main
        // storage, which means that any changes we make to the new array aren't
        // going to affect the actual LazyJsonMapper object's own data. That
        // won't matter for pure getter-based objects like this one (which is
        // all you'll need in 99.9999999% of cases where you'll want to read
        // unpredictable data). So if the user serializes this LazyJsonMapper
        // object, or gets it "asJson()", etc, then they'd still be serializing
        // the original, untouched internal data, which is exactly what we are
        // retrieving here. So everything works out perfectly as long as we
        // don't have any setters! (But setters will be demonstrated later.)
        if ($this->_userList === null) {
            // Get a copy of the internal data as an array, and cache it.
            // NOTE: This only throws if there is unmappable data internally.
            $this->_userList = $this->asArray(); // Throws.
        }

        // Loop through the list of JSON properties and convert every "array"
        // value to a User object instead. That's because all of JSON's nested,
        // not-yet-converted "JSON object values" are associative sub-arrays.
        foreach ($this->_userList as &$value) {
            if (is_array($value)) {
                // NOTE: The User constructor can only throw if a custom _init()
                // fails or if its class property map can't be compiled.
                $value = new User($value); // Throws.
            }
        }

        // Now just return our key-value array. The inner array values have
        // been converted to User objects, which makes them easy to work with.
        return $this->_userList;
    }