Gets user data

@param string|null $key Key of something you want to get from the identity data
@return mixed
421020
public function get($key = null)
    {
        if (empty($this->_identity)) {
            return null;
        }

        if ($key === null) {
            return $this->_identity->getOriginalData();
        }

        return Hash::get($this->_identity, $key);
    }
738606
public static function getUserConfig($key, $default=NULL)
    {
        $uid = Yii::app()->user->id;
        $data = Yii::app()->db->createCommand('SELECT value FROM user_metadata AS t WHERE t.key = :key AND t.user_id = :id')
                              ->bindParam(':id', $uid)
                              ->bindParam(':key', $key)
                              ->queryAll();

        if (!isset($data[0]['value']))
            return NULL;

        return $data[0]['value'];
    }
88383
public function get($key)
    {
        if (is_null($this->data)) {
            $this->data = $this->table->getColumn($this->name)->toArray();
        }

        return $this->data[$key];
    }
324833
public function get($key)
    {
        if (!$this->isEnabled()) {
            return null;
        }

        $value = $this->server->get($this->prefix . $key);

        return false === $value ? null : $value;
    }
906464
public function getData($key = null)
    {
        if ($key === null) {
            return $this->extraData;
        } elseif (isset($this->extraData[$key])) {
            return $this->extraData[$key];
        } else {
            return null;
        }
    }
1294236
public static function getValue(string $key)
    {
        $key = \mb_strtolower($key);
        if(isset(self::$_data[$key])) {
            return self::$_data[$key];
        }
        return null;
    }
593535
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!isset($this->getBackEndUser()->uc[self::PHPUNIT_SETTINGS_KEY][$key])) {
            return null;
        }

        return $this->getBackEndUser()->uc[self::PHPUNIT_SETTINGS_KEY][$key];
    }
939575
public function getData($key = null)
    {
        if (null === $key) {
            return $this->data;
        }
        
        $return = $this->data;
        foreach (explode('.', $key) as $subKey) {
            if (isset($return[$subKey])) {
                $return = $return[$subKey];
            } else {
                return null;
            }
        }
        return $return;
    }
1092682
public function get($key = null)
    {
        $this->_prepareData($key);
        $data = null;

        if (is_null($key)) {
            $data = $this->_DATA;
        } elseif (array_key_exists($key, $this->_DATA)) {
            $data = $this->_DATA[$key];
        }

        if ($this->_getPreparationOn) {
            return $this->_dataPreparation($key, $data, $this->_dataRetrieveCallbacks);
        }
        return $data;
    }
675105
public function getData($key = ''){

        $key = $this->normalizeKeyName($key);

        if( $key === '' ){
            return $this->_data;
        }

        return isset($this->_data[$key]) ? $this->_data[$key] : NULL;
    }
489052
public function get($key)
	{
		if (isset($this->info[$key]))
		{
			return $this->info[$key];
		}

		return null;
	}
832581
public function getUserData($sKey = null)
    {
        $this->setup();
        if (empty($this->oSession)) {
            return null;
        }
        return $this->oSession->userdata($sKey);
    }
1345319
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->requestDataHasBeenRetrieved) {
            $this->retrieveRequestData();
        }
        if (!isset($this->cachedRequestData[$key])) {
            return null;
        }

        return $this->cachedRequestData[$key];
    }
261462
protected function get($key)
    {
        $this->checkForNonEmptyKey($key);
        if (!$this->settingsHaveBeenRetrieved) {
            $this->retrieveSettings();
        }
        if (!isset($this->cachedSettings[$key])) {
            return null;
        }

        return $this->cachedSettings[$key];
    }
438856
public function data(string $key, array $data = null)
    {
        $this->tryLoad($key);

        if (!\array_key_exists($key, $this->data))
        {
            $this->data[$key] = $this->get($key, $data);
        }

        return $this->data[$key];
    }
1298475
protected function getData($key = null)
    {
        if (null === $key) {
            return $this->getRedis()->hgetall($this->getRedisNamespace());
        }

        return $this->getRedis()->hget($this->getRedisNamespace(), $key);
    }
78453
public function user($key = null)
    {
        if (empty($this->user)) {
            return null;
        }

        return $key ? Hash::get($this->user, $key) : $this->user;
    }