src/View/Helper/IdentityHelper.php
public function get($key = null)
    {
        if (empty($this->_identity)) {
            return null;
        }

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

        return Hash::get($this->_identity, $key);
    }
public function get($key = null)
    {
        if (empty($this->_identity)) {
            return null;
        }

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

        return Hash::get($this->_identity, $key);
    }
public function get ( $ key = null ) { if ( empty ( $ this -> _identity ) ) { return null ; } if ( $ key === null ) { return $ this -> _identity -> getOriginalData ( ) ; } return Hash :: get ( $ this -> _identity , $ key ) ; }
Gets user data

@param string|null $key Key of something you want to get from the identity data
@return mixed
Gets user data