Method equal to the AuthComponent::user()

@param string $key Key to read from the user object
@return mixed
503225
public function user($key = null) {
		if ($key === null) {
			return $this->_userData;
		}

		return Hash::get((array)$this->_userData(true), $key);
	}
1356874
public function read($key)
    {
        $key = $this->_key($key);

        if (!$this->_init || $this->_setKey($key) === false) {
            return false;
        }

        if ($this->_config['lock']) {
            $this->_File->flock(LOCK_SH);
        }

        $this->_File->rewind();
        $time = time();
        $cachetime = (int)$this->_File->current();

        if ($cachetime < $time) {
            if ($this->_config['lock']) {
                $this->_File->flock(LOCK_UN);
            }

            return false;
        }

        $data = '';
        $this->_File->next();
        while ($this->_File->valid()) {
            $data .= $this->_File->current();
            $this->_File->next();
        }

        if ($this->_config['lock']) {
            $this->_File->flock(LOCK_UN);
        }

        $data = trim($data);

        if ($data !== '' && !empty($this->_config['serialize'])) {
            if ($this->_config['isWindows']) {
                $data = str_replace('\\\\\\\\', '\\', $data);
            }
            $data = unserialize((string)$data);
        }

        return $data;
    }
835746
public function getOneByKey($key)
	{
		// Note: this switch exists like this because PHP does not have "traditional method overloading".
		switch(gettype($key))
		{
			// Use EntityIdentifier to retrieve.
			case 'object':
				return $this->getOneByIdentifier($key);
			break;

			// Use a composite key to retrieve.
			case 'array':
				return $this->getOneByCompoundKey($key);
			break;

			// Use an actual Identifier string to retrieve.
			case 'string':
				return $this->getOneByUuid($key);
			break;

			// Use Entity to retrieve.
			default:
				return new Payload($key, 'invalid_key_type');
		}
	}
303262
public function getSessionUser($sessionKey = NULL) {
		
		$sessionKey = $sessionKey ?: SessionUser::DEFAULT_KEY_NAME;
		
		$sessionUser = Session::getSessionDataBag()->get($sessionKey);
		
		if($sessionUser instanceof SessionUser) {
			return $sessionUser;
		}
		
	}
473597
private function getUserIdByActivationKey($key)
    {

        // Lets try to find the user id in our activation token table
        $token = new ActivationToken($this->db);
        $result = $token->getActivationTokenDataFromKey($key);

        if (empty($result)) {
            return false;
        }

        // Do not trust any result that has more then one entry!!!
        if (count($result) > 1) {

            $this->logger->warning('There is more than one user with identical activationkey!');

            Throw new UserException('There is more than one user with identical activationkey!');
        }

        return $result[0]['id_user'];
    }
1163684
private function read($key)
    {
        $_jsonFile = $this->_root.$key.'.json';
        if(empty($this->_nr[$key])) {
            if (file_exists($_jsonFile)) {
                $_ar = @file_get_contents($_jsonFile);
                $ar = json_decode($_ar,true);
            } else {
                $ar = array();
            }
            $this->_nr[$key] = $ar;
        }
        return $this;
    }
813010
function &get($key) {
		if ($key=='_id')
			return $this->_id;
		elseif (array_key_exists($key,$this->fields))
			return $this->fields[$key]['value'];
		elseif (array_key_exists($key,$this->adhoc))
			return $this->adhoc[$key]['value'];
		elseif (array_key_exists($key,$this->props))
			return $this->props[$key];
		user_error(sprintf(self::E_Field,$key),E_USER_ERROR);
	}
617668
public function read($key) {
        return isset($_SESSION[$this->prefix . $key]) ? $_SESSION[$this->prefix . $key] : null;
    }
1044959
public function get($key)
    {
        $connection = $this->getConnection($key);
        $this->writeToRemote(array(
            'cmd' => 'get',
            'key' => $key,
        ), $connection);
        return $this->readFromRemote($connection);
    }
307389
public function setAuthKey($key)
    {
        $authKeyAttribute = $this->authKeyAttribute;
        return (is_string($authKeyAttribute) && !empty($authKeyAttribute)) ? $this->$authKeyAttribute = $key : null;
    }
427202
public function get(string $key): ?\BearCMS\Internal\Data2\UserInvitation
    {
        $data = \BearCMS\Internal\Data::getValue('bearcms/users/invitation/' . md5($key) . '.json');
        if ($data !== null) {
            return $this->makeUserFromRawData($data);
        }
        return null;
    }
429498
public function read($key)
    {
        if ($value = $this->memcache->get($key)) {
            $arr = unserialize($value);
            $this->changed = $arr['changed'];
            $this->ip      = $arr['ip'];
            $this->vars    = $arr['vars'];
            $this->key     = $key;
        }

        if ($this->debug) {
            $this->debug('get', $key, $value);
        }

        return $this->vars ?: '';
    }
467321
public function &__get($key)
    {
        if (!isset($this->$key)) {
            $this->$key = null;
        }

        return $this->$key;
    }
888337
public function read($key)
    {
        if ($value = $this->redis->get($key)) {
            $arr = unserialize($value);
            $this->changed = $arr['changed'];
            $this->ip      = $arr['ip'];
            $this->vars    = $arr['vars'];
            $this->key     = $key;

            return !empty($this->vars) ? (string) $this->vars : '';
        }

        return '';
    }
55753
protected function get($key)
    {
        $this->loadConfigurationLazily();

        if ($this->hasConfigurationValue($key)) {
            $result = $this->configuration[$key];
        } else {
            $result = '';
        }

        return $result;
    }
511784
public function getUserState($key, $default = null)
    {
        $session = JFactory::getSession();
        $registry = $session->get('registry');

        if (!is_null($registry))
        {
            return $registry->get($key, $default);
        }

        return $default;
    }
1094684
public static function get($key)
    {
        return isset(self::$config[$key]) ? self::$config[$key] : null;
    }