Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. ublic function processLoginForm($form)
  2. {
  3. $values = $form->getValues();
  4. $user = Environment::getUser();
  5.  
  6.  
  7. if (!$user->isLoggedIn()){
  8. try {
  9. $user->setExpiration('+ 1440 minutes', FALSE);
  10. $user->login($values['username'], $values['password']);
  11. $this->redirect("Homepage:default");
  12. }
  13. catch (AuthenticationException $e){
  14. $form->addError($e->getMessage());
  15. }
  16.  
  17.  
  18.  
  19. }
  20. else {
  21. $form->addError("Nejprve se odhlašte.");
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement