src/Model/Behavior/CreatorModifierBehavior.php
protected function sessionUserId() {
		$userId = null;
		$request = $this->newRequest();

		if ($request->session()->started()) {
			$userId = $request->session()->read($this->_config['sessionUserIdKey']);
		} else {
			$this->log('The Session is not started. This typically means a User is not logged in. In this case there is no Session value for the currently active User and therefore we will set the `creator_id` and `modifier_id` to a null value. As a fallback, we are manually starting the session and reading the `$this->_config[sessionUserIdKey]` value, which is probably not correct.', 'debug');
			try {
				$request->session()->start();
				$userId = $request->session()->read($this->_config['sessionUserIdKey']);
			} catch (RuntimeException $e) {
			}
		}

		return $userId;
	}
protected function sessionUserId() {
		$userId = null;
		$request = $this->newRequest();

		if ($request->session()->started()) {
			$userId = $request->session()->read($this->_config['sessionUserIdKey']);
		} else {
			$this->log('The Session is not started. This typically means a User is not logged in. In this case there is no Session value for the currently active User and therefore we will set the `creator_id` and `modifier_id` to a null value. As a fallback, we are manually starting the session and reading the `$this->_config[sessionUserIdKey]` value, which is probably not correct.', 'debug');
			try {
				$request->session()->start();
				$userId = $request->session()->read($this->_config['sessionUserIdKey']);
			} catch (RuntimeException $e) {
			}
		}

		return $userId;
	}
protected function sessionUserId ( ) { $ userId = null ; $ request = $ this -> newRequest ( ) ; if ( $ request -> session ( ) -> started ( ) ) { $ userId = $ request -> session ( ) -> read ( $ this -> _config [ 'sessionUserIdKey' ] ) ; } else { $ this -> log ( 'The Session is not started. This typically means a User is not logged in. In this case there is no Session value for the currently active User and therefore we will set the `creator_id` and `modifier_id` to a null value. As a fallback, we are manually starting the session and reading the `$this->_config[sessionUserIdKey]` value, which is probably not correct.' , 'debug' ) ; try { $ request -> session ( ) -> start ( ) ; $ userId = $ request -> session ( ) -> read ( $ this -> _config [ 'sessionUserIdKey' ] ) ; } catch ( RuntimeException $ e ) { } } return $ userId ; }
Return the User.id grabbed from the Session information.

@return string The string representing the current logged in user.
Return the User . id grabbed from the Session information .