Returns user information

@return array
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,
        ];
    }
371043
public function info()
    {
        $info = [
            'id' => $this->id,
            'action' => $this->action,
            'condition' => $this->condition,
            'expressions' => $this->expressions,
            'logMessageFormat' => $this->logMessageFormat,
            'logLevel' => $this->logLevel,
            'isFinalState' => $this->isFinalState,
            'createTime' => $this->createTime,
            'finalTime' => $this->finalTime,
            'stackFrames' => array_map(function ($sf) {
                return $sf->info();
            }, $this->stackFrames),
            'evaluatedExpressions' => $this->evaluatedExpressions
        ];
        if ($this->labels) {
            $info['labels'] = $this->labels;
        }
        if ($this->userEmail) {
            $info['userEmail'] = $this->userEmail;
        }
        if ($this->location) {
            $info['location'] = $this->location->info();
        }
        if ($this->status) {
            $info['status'] = $this->status->info();
        }
        if ($this->variableTable) {
            $info['variableTable'] = $this->variableTable->info();
        }
        return $info;
    }
1251870
protected function getUserId()
    {
        if (!$this->users) {
            $userStorage = $this->entityTypeManager->getStorage('user');

            $this->users = $userStorage->loadByProperties(['status' => true]);
        }

        return array_rand($this->users);
    }
873807
public function getActiveUsers()
    {
        $data = $this->call('apps/' . $this->appId . '/activeusers', [], 'get');

        $array = [];
        foreach ($data as $msg) {
            $array[] = User::fromResponse($msg);
        }

        return $array;
    }
230756
public function info() {
        $info             = $this->data;
        $info['id']       = $this->uid;
        $info['username'] = $this->username;
        $info['nickname'] = $this->nickname;
        $info['phone']    = $this->phone;
        $info['email']    = $this->email;
        $info['avatar']   = $this->avatar;

        return $info;
    }
873069
public function getData()
    {
        $tasksToShow = $this->numItems;

        $tasks = $this->taskManager->findByAssignedToAndStatus(
            $this->tokenStorage->getToken()->getUser()->getId(),
            [],
            [],
            $tasksToShow
        );

        $data = [];

        foreach ($tasks as $task) {
            $createUser = $this->userManager->find($task->getCreateUserId());
            $type = $this->types->get($task->getType());

            $data[] = [
                'id' => $task->getId(),
                'text' => $type->getText($task),
                'type' => $task->getType(),
                'status' => $task->getFiniteState(),
                'comment' => '', //$latestStatus->getComment(), TODO: fix
                'create_user' => $createUser->getDisplayName(),
                'create_uid' => $task->getCreateUserId(),
                'create_date' => $task->getCreatedAt()->format('Y-m-d H:i:s'),
            ];
        }

        return $data;
    }
1146517
protected function _getUserData()
     {
         $me = $this->get('me');
         
         $data = array(
                'profile_url' => 'https://www.facebook.com/profile.php?id='.$me->id,
                'name' => $me->name,
                'id' => $me->id,
                'username' => $me->username,
                'email' => $me->email,
                'description' => $me->about,
                'thumb_avatar' => $this->getRequest(array('url' => $this->api_url.'/me/picture'))->getURL(),
                'large_avatar' => $this->getRequest(array(
                    'url' => $this->api_url.'/me/picture', 
                    'data' => array('type' => 'large')
                ))->getURL(),
            );

         return $data;
     }
1175913
protected function getUserInformation($user = null)
    {
        // Defaults
        if (is_null($user)) {
            return [
                'name' => 'Guest',
                'user' => ['guest' => true],
            ];
        }

        // The default auth identifer is the ID number, which isn't all that
        // useful. Try username and email.
        $identifier = $user->getAuthIdentifier();
        if (is_numeric($identifier)) {
            try {
                if ($user->username) {
                    $identifier = $user->username;
                } elseif ($user->email) {
                    $identifier = $user->email;
                }
            } catch (\Exception $e) {
            }
        }

        return [
            'name' => $identifier,
            'user' => $user instanceof Arrayable ? $user->toArray() : $user,
        ];
    }
303129
public function getUsersAjax()
    {
        if (!$this->access('user')) {
            return array('error' => $this->text('No access'));
        }

        $options = array(
            'email_like' => $this->getPosted('term'),
            'store_id' => $this->getPosted('store_id'),
            'limit' => array(0, $this->config('autocomplete_limit', 10)));

        return $this->user->getList($options);
    }
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;
    }
892588
public function get_users() : array {
        $users = [];
        foreach ($this->userids as $userid) {
            if ($user = \core_user::get_user($userid)) {
                $users[] = $user;
            }
        }

        return $users;
    }
1211206
public function getUsersHavingSuperUserAccess()
    {
        Piwik::checkUserIsNotAnonymous();

        $users = $this->model->getUsersHavingSuperUserAccess();
        $users = $this->enrichUsers($users);

        // we do not filter these users by access and return them all since we need to print this information in the
        // UI and they are allowed to see this.

        return $users;
    }
383220
public function get_user_id()
	{
		if (empty($this->user))
		{
			return false;
		}

		return array($this->id, (int) $this->user['id']);
	}
597141
public function users()
    {
        $list  = [];
        $users = User::all();

        foreach ($users as $key => $user) {
            $list[$user->id] = $user->name;
        }

        return $list;
    }
915092
public function getUsersAge()
    {
        $dates = $this->getStartEndDate();

        $data = LaravelAnalytics::performQuery($dates['start'], $dates['end'], 'ga:sessions',
            ['dimensions' => 'ga:userAgeBracket']);

        $labels = [];
        $datasets = [];
        $rows = $data->rows;
        if (is_null($rows)) {
            return ['labels' => [], 'datasets' => []];
        }
        foreach ($rows as $k => $item) {
            $labels[] = ucfirst($item[0]);
            $datasets[] = $item[1];
        }

        $datasets = [$this->getDataSet('Ages', $datasets, 0)];

        return ['labels' => $labels, 'datasets' => $datasets];
    }
170909
public function getSystemUserArray()
    {
        $repo = $this->get('sulu_security.user_repository');
        $users = $repo->findUserBySystem($this->container->getParameter('sulu_security.system'));
        $contacts = [];

        foreach ($users as $user) {
            $contact = $user->getContact();
            $contacts[] = [
                'id' => $contact->getId(),
                'fullName' => $contact->getFullName()
            ];
        }

        return $contacts;
    }
705092
public function getUsersList() {
        $response=CodeBank_ClientAPI::responseBase();
        
        $members=Permission::get_members_by_permission(array('ADMIN', 'CODE_BANK_ACCESS'));
        foreach($members as $member) {
            $response['data'][]=array(
                                    'id'=>$member->ID,
                                    'username'=>$member->Email,
                                    'lastLogin'=>$member->LastVisited
                                );
        }
        
        
        return $response;
    }