Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. final public function login()
  2. {
  3. global $template, $_CONFIG, $core;
  4.  
  5. if(isset($_POST['login']))
  6. {
  7. $template->form->setData();
  8. unset($template->form->error);
  9.  
  10. if($this->nameTaken($template->form->log_username))
  11. {
  12. if($this->isBanned($template->form->log_username) == false || $this->isBanned($_SERVER['REMOTE_ADDR']) == false)
  13. {
  14. $mypenis = password_verify($template->form->log_password);
  15. if($this->userValidation($template->form->log_username, $core->hashed($mypenis)))
  16. {
  17. $this->turnOn($template->form->log_username);
  18. $this->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);
  19. $template->form->unsetData();
  20. header('Location: ' . $_CONFIG['hotel']['url'] . '/me');
  21. exit;
  22. }
  23. else
  24. {
  25. $template->form->error = 'Details do not match';
  26. return;
  27. }
  28. }
  29. else
  30. {
  31. $template->form->error = 'Sorry, it appears this user is banned<br />';
  32. $template->form->error .= 'Reason: ' . $this->getReason($template->form->log_username);
  33. return;
  34. }
  35. }
  36. else
  37. {
  38. $template->form->error = 'Username does not exist';
  39. return;
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement