Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ublic function processLoginForm($form)
- {
- $values = $form->getValues();
- $user = Environment::getUser();
- if (!$user->isLoggedIn()){
- try {
- $user->setExpiration('+ 1440 minutes', FALSE);
- $user->login($values['username'], $values['password']);
- $this->redirect("Homepage:default");
- }
- catch (AuthenticationException $e){
- $form->addError($e->getMessage());
- }
- }
- else {
- $form->addError("Nejprve se odhlašte.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement