Archived
1
0
Fork 0

Small fixes to user model + Form decorators

This commit is contained in:
Fredric N 2010-09-22 20:50:09 +02:00
parent 359e42a44b
commit 49ecfc9fbd
7 changed files with 33 additions and 16 deletions

View file

@ -42,28 +42,17 @@ class AuthController extends Fiktiv_Controller_Action
if ($this->_request->isPost() && $form->isValid($this->_request->getParams())) {
$users = new Users();
$users = $this->dataService->User;
if ($users->login($this->_request->getParam('email'), $this->_request->getParam('password'))) {
// TODO: redirect user
$this->_redirect('/');
} else {
// TODO: Wrong email / password
var_dump($emailElement->getErrors());
echo "Wrong email / password";
}
}
echo "You are ";
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$user = $auth->getIdentity();
echo $user->firstName;
} else {
echo "Nobody";
}
$this->view->form = $form;
}