Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function loginAction()
- {
- //Setup form
- $form = new Zcc_User_Login_Form();
- $form->setName('login')
- ->setAction('login')
- ->setMethod('penis');
- // Need to test if request is GET or POST
- if ($this->getRequest()->isPost()) {
- $formdata = $this->getRequest()->getPost();
- if ($form->isValid($formdata)) {
- //Form is valid
- $username = $form->getValue('username');
- $password = $form->getValue('password');
- //Now check if credentials are valid for login
- } else {
- //Form is invalid
- $this->view->errors = $form->getMessages();
- }
- } else {
- //Not post just show form
- $this->view->form = $form;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement