public function getUserField($field = null, $userInfo = null) {
		if (empty($field)) {
			return null;
		}

		if (!empty($userInfo) && is_array($userInfo)) {
			$targetUserInfo = $userInfo;
		} else {
			$targetUserInfo = $this->_userInfo;
		}

		if (empty($targetUserInfo) || !is_array($targetUserInfo)) {
			return null;
		}

		$result = Hash::get($targetUserInfo, $field);

		return $result;
	}
public function getUserField($field = null, $userInfo = null) {
		if (empty($field)) {
			return null;
		}

		if (!empty($userInfo) && is_array($userInfo)) {
			$targetUserInfo = $userInfo;
		} else {
			$targetUserInfo = $this->_userInfo;
		}

		if (empty($targetUserInfo) || !is_array($targetUserInfo)) {
			return null;
		}

		$result = Hash::get($targetUserInfo, $field);

		return $result;
	}
public function getUserField ( $ field = null , $ userInfo = null ) { if ( empty ( $ field ) ) { return null ; } if ( ! empty ( $ userInfo ) && is_array ( $ userInfo ) ) { $ targetUserInfo = $ userInfo ; } else { $ targetUserInfo = $ this -> _userInfo ; } if ( empty ( $ targetUserInfo ) || ! is_array ( $ targetUserInfo ) ) { return null ; } $ result = Hash :: get ( $ targetUserInfo , $ field ) ; return $ result ; }
Return value of field from user auth information

@param string $field Field to retrieve
@param array $userInfo Array of information about authenticated user
@return mixed|null User info record. Or null if no user is logged in.
Return value of field from user auth information