Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function validateWrite(AgaviRequestDataHolder $rd)
- {
- // any errors from .xml validation?
- if($this->getContainer()->getValidationManager()->hasErrors()) {
- return false;
- }
- $form = $rd->getParameter("form");
- $row = dbcall-goes-here($form['username'],$form['password']);
- // match?
- if( $row === false ) {
- $this->getContainer()->getValidationManager()->setError("form[username]",__('The username and password do not match anyone in our database'));
- return false;
- }
- // all good
- return true;
- }
Add Comment
Please, Sign In to add comment