src/View/Helper/AuthHelper.php
protected function _setupUserData() {
		if (is_string($this->_config['session'])) {
			$this->_userData = $this->_View->request->session()->read($this->_config['session']);
		} else {
			if (!array_key_exists($this->_config['viewVar'], $this->_View->viewVars)) {
				if ($this->_config['viewVarException'] === true) {
					throw new \RuntimeException(sprintf('View var `%s` not present! Please set the auth data to the view. See the documentation.', $this->_config['viewVar']));
				} else {
					$this->_userData = [];
				}
			} else {
				$this->_userData = $this->_View->viewVars[$this->_config['viewVar']];
			}
		}
	}
protected function _setupUserData() {
		if (is_string($this->_config['session'])) {
			$this->_userData = $this->_View->request->session()->read($this->_config['session']);
		} else {
			if (!array_key_exists($this->_config['viewVar'], $this->_View->viewVars)) {
				if ($this->_config['viewVarException'] === true) {
					throw new \RuntimeException(sprintf('View var `%s` not present! Please set the auth data to the view. See the documentation.', $this->_config['viewVar']));
				} else {
					$this->_userData = [];
				}
			} else {
				$this->_userData = $this->_View->viewVars[$this->_config['viewVar']];
			}
		}
	}
protected function _setupUserData ( ) { if ( is_string ( $ this -> _config [ 'session' ] ) ) { $ this -> _userData = $ this -> _View -> request -> session ( ) -> read ( $ this -> _config [ 'session' ] ) ; } else { if ( ! array_key_exists ( $ this -> _config [ 'viewVar' ] , $ this -> _View -> viewVars ) ) { if ( $ this -> _config [ 'viewVarException' ] === true ) { throw new \ RuntimeException ( sprintf ( 'View var `%s` not present! Please set the auth data to the view. See the documentation.' , $ this -> _config [ 'viewVar' ] ) ) ; } else { $ this -> _userData = [ ] ; } } else { $ this -> _userData = $ this -> _View -> viewVars [ $ this -> _config [ 'viewVar' ] ] ; } } }
Sets up the user data from session or view var

@throws \RuntimeException
@return void
Sets up the user data from session or view var