<?php
namespace Moto\Application\Auth; use Moto\InputFilter\AbstractInputFilter; use Moto; class ForgotPasswordFilter extends AbstractInputFilter { protected $_name = 'auth.forgot'; public function init() { $this->add(array( 'name' => 'email', 'required' => true, 'filters' => array( array('name' => 'StripTags'), array('name' => 'StringTrim'), ), 'validators' => array( array( 'name' => 'EmailAddress', 'options' => array( 'useMxCheck' => false, 'useDeepMxCheck' => false, 'useDomainCheck' => false, ), 'break_chain_on_failure' => true, ), array( 'name' => 'Db\RecordExists', 'options' => array( 'table' => Moto\Config::get('database.prefix') . 'users', 'field' => 'email', 'adapter' => Moto\Config::get('databaseAdapter') ) ) ), )); } }