protected function _getUserCredentials(CakeRequest $request) {
		$externalAuth = $this->_useExternalAuth();
		$usr = null;
		$pwd = null;

		if ($externalAuth) {
			$user = env('REMOTE_USER');
			if (empty($user)) {
				$user = env('REDIRECT_REMOTE_USER');
			}
			if (empty($user) || !is_string($user)) {
				return compact('usr', 'pwd');
			}

			$usr = $user;
		} else {
			$userModel = $this->settings['userModel'];
			$objectModel = ClassRegistry::init($userModel, true);
			if ($objectModel === false) {
				return compact('usr', 'pwd');
			}

			$fields = $this->settings['fields'];
			if (!$this->_checkFields($request, $objectModel->alias, $fields)) {
				return compact('usr', 'pwd');
			}

			$user = $request->data[$objectModel->alias][$fields['username']];
			if (empty($user) || !is_string($user)) {
				return compact('usr', 'pwd');
			}

			$pswd = $request->data[$objectModel->alias][$fields['password']];
			if (empty($pswd) || !is_string($pswd)) {
				return compact('usr', 'pwd');
			}

			$usr = $user;
			$pwd = $pswd;
		}

		return compact('usr', 'pwd');
	}
protected function _getUserCredentials(CakeRequest $request) {
		$externalAuth = $this->_useExternalAuth();
		$usr = null;
		$pwd = null;

		if ($externalAuth) {
			$user = env('REMOTE_USER');
			if (empty($user)) {
				$user = env('REDIRECT_REMOTE_USER');
			}
			if (empty($user) || !is_string($user)) {
				return compact('usr', 'pwd');
			}

			$usr = $user;
		} else {
			$userModel = $this->settings['userModel'];
			$objectModel = ClassRegistry::init($userModel, true);
			if ($objectModel === false) {
				return compact('usr', 'pwd');
			}

			$fields = $this->settings['fields'];
			if (!$this->_checkFields($request, $objectModel->alias, $fields)) {
				return compact('usr', 'pwd');
			}

			$user = $request->data[$objectModel->alias][$fields['username']];
			if (empty($user) || !is_string($user)) {
				return compact('usr', 'pwd');
			}

			$pswd = $request->data[$objectModel->alias][$fields['password']];
			if (empty($pswd) || !is_string($pswd)) {
				return compact('usr', 'pwd');
			}

			$usr = $user;
			$pwd = $pswd;
		}

		return compact('usr', 'pwd');
	}
protected function _getUserCredentials ( CakeRequest $ request ) { $ externalAuth = $ this -> _useExternalAuth ( ) ; $ usr = null ; $ pwd = null ; if ( $ externalAuth ) { $ user = env ( 'REMOTE_USER' ) ; if ( empty ( $ user ) ) { $ user = env ( 'REDIRECT_REMOTE_USER' ) ; } if ( empty ( $ user ) || ! is_string ( $ user ) ) { return compact ( 'usr' , 'pwd' ) ; } $ usr = $ user ; } else { $ userModel = $ this -> settings [ 'userModel' ] ; $ objectModel = ClassRegistry :: init ( $ userModel , true ) ; if ( $ objectModel === false ) { return compact ( 'usr' , 'pwd' ) ; } $ fields = $ this -> settings [ 'fields' ] ; if ( ! $ this -> _checkFields ( $ request , $ objectModel -> alias , $ fields ) ) { return compact ( 'usr' , 'pwd' ) ; } $ user = $ request -> data [ $ objectModel -> alias ] [ $ fields [ 'username' ] ] ; if ( empty ( $ user ) || ! is_string ( $ user ) ) { return compact ( 'usr' , 'pwd' ) ; } $ pswd = $ request -> data [ $ objectModel -> alias ] [ $ fields [ 'password' ] ] ; if ( empty ( $ pswd ) || ! is_string ( $ pswd ) ) { return compact ( 'usr' , 'pwd' ) ; } $ usr = $ user ; $ pwd = $ pswd ; } return compact ( 'usr' , 'pwd' ) ; }
Return user credentials

@param CakeRequest $request Request to get authentication information from.
@return array  Return user credentials in format:
- key: `usr`, value: username;
- key: `pwd`, value: password.
Return user credentials