Risto/Controller/Component/Auth/PinAuthenticate.php
public function authenticate(CakeRequest $request, CakeResponse $response) {
		App::uses('MtSites', 'MtSites./Utility/MtSites');

		// solo utilizar el logueo con PIN desde un Tenant
		if ( !MtSites::isTenant() ) {
			return false;
		}
		$userModel = $this->settings['userModel'];
		list(, $model) = pluginSplit($userModel);

		$fields = $this->settings['fields'];
		if (!$this->_checkFields($request, $model, $fields)) {
			return false;
		}
		return $this->_findUser($request->data[$model][$fields['pin']]);
	}
public function authenticate(CakeRequest $request, CakeResponse $response) {
		App::uses('MtSites', 'MtSites./Utility/MtSites');

		// solo utilizar el logueo con PIN desde un Tenant
		if ( !MtSites::isTenant() ) {
			return false;
		}
		$userModel = $this->settings['userModel'];
		list(, $model) = pluginSplit($userModel);

		$fields = $this->settings['fields'];
		if (!$this->_checkFields($request, $model, $fields)) {
			return false;
		}
		return $this->_findUser($request->data[$model][$fields['pin']]);
	}
public function authenticate ( CakeRequest $ request , CakeResponse $ response ) { App :: uses ( 'MtSites' , 'MtSites./Utility/MtSites' ) ; // solo utilizar el logueo con PIN desde un Tenant if ( ! MtSites :: isTenant ( ) ) { return false ; } $ userModel = $ this -> settings [ 'userModel' ] ; list ( , $ model ) = pluginSplit ( $ userModel ) ; $ fields = $ this -> settings [ 'fields' ] ; if ( ! $ this -> _checkFields ( $ request , $ model , $ fields ) ) { return false ; } return $ this -> _findUser ( $ request -> data [ $ model ] [ $ fields [ 'pin' ] ] ) ; }
Authenticates the identity contained in a request. Will use the `settings.userModel`, and `settings.fields`
to find POST data that is used to find a matching record in the `settings.userModel`. Will return false if
there is no post data, either username or pin is missing, or if the scope conditions have not been met.

@param CakeRequest $request The request that contains login information.
@param CakeResponse $response Unused response object.
@return mixed False on login failure. An array of User data on success.
Authenticates the identity contained in a request . Will use the settings . userModel and settings . fields to find POST data that is used to find a matching record in the settings . userModel . Will return false if there is no post data either username or pin is missing or if the scope conditions have not been met .