src/Controller/Component/UserToolComponent.php
protected function _initPasswordReset(EntityInterface $entity, $options) {
		try {
			$this->UserTable->initPasswordReset($this->_getRequest()->getData($options['field']), $options);
			$this->handleFlashAndRedirect('success', $options);
			if ($options['setEntity']) {
				$this->_setViewVar('userEntity', $entity);
			}

			return true;
		} catch (RecordNotFoundException $e) {
			$this->handleFlashAndRedirect('error', $options);
		}

		return false;
	}
protected function _initPasswordReset(EntityInterface $entity, $options) {
		try {
			$this->UserTable->initPasswordReset($this->_getRequest()->getData($options['field']), $options);
			$this->handleFlashAndRedirect('success', $options);
			if ($options['setEntity']) {
				$this->_setViewVar('userEntity', $entity);
			}

			return true;
		} catch (RecordNotFoundException $e) {
			$this->handleFlashAndRedirect('error', $options);
		}

		return false;
	}
protected function _initPasswordReset ( EntityInterface $ entity , $ options ) { try { $ this -> UserTable -> initPasswordReset ( $ this -> _getRequest ( ) -> getData ( $ options [ 'field' ] ) , $ options ) ; $ this -> handleFlashAndRedirect ( 'success' , $ options ) ; if ( $ options [ 'setEntity' ] ) { $ this -> _setViewVar ( 'userEntity' , $ entity ) ; } return true ; } catch ( RecordNotFoundException $ e ) { $ this -> handleFlashAndRedirect ( 'error' , $ options ) ; } return false ; }
Initializes the password reset and handles a possible errors.

@param \Cake\Datasource\EntityInterface $entity User entity
@param array $options Options array Options
@return bool
Initializes the password reset and handles a possible errors .