src/View/Helper/AuthHelper.php
public function user($key = null) {
		if ($this->sessionKey && $this->request->session()->check($this->sessionKey)) {
			$user = $this->request->session()->read($this->sessionKey);
		} else {
			return null;
		}
		if ($key === null) {
			return $user;
		}
		return Hash::get($user, $key);
	}
public function user($key = null) {
		if ($this->sessionKey && $this->request->session()->check($this->sessionKey)) {
			$user = $this->request->session()->read($this->sessionKey);
		} else {
			return null;
		}
		if ($key === null) {
			return $user;
		}
		return Hash::get($user, $key);
	}
Accessor to the logged in user's properties

@param string $key Key to read
@return mixed