Add filters as in the test system
authorMichael Tänzer <neo@nhng.de>
Sun, 18 Apr 2010 14:47:57 +0000 (16:47 +0200)
committerMichael Tänzer <neo@nhng.de>
Sun, 18 Apr 2010 14:47:57 +0000 (16:47 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
manager/application/controllers/LoginController.php

index 16f5c7d..08a9519 100644 (file)
@@ -219,10 +219,13 @@ class LoginController extends Zend_Controller_Action
                $al->setDisableTranslator(false);\r
                $username = new Zend_Form_Element_Text('login_name');\r
                $username->setRequired(true)\r
-                                ->setLabel(I18n::_('User Name'));\r
+                                ->setLabel(I18n::_('User Name'))\r
+                                ->addFilter(new Zend_Filter_StringTrim())\r
+                                ->addFilter(new Zend_Filter_StripTags());\r
                $password = new Zend_Form_Element_Password('login_password');\r
                $password->setRequired(true)\r
-                                ->setLabel(I18n::_('Password'));\r
+                                ->setLabel(I18n::_('Password'))\r
+                                ->addFilter(new Zend_Filter_StringTrim());\r
                $submit = new Zend_Form_Element_Submit('submit');\r
                $submit->setLabel(I18n::_('Login'));\r
                $form->addElement($username)\r