Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final public function login()
- {
- global $template, $_CONFIG, $core;
- if(isset($_POST['login']))
- {
- $template->form->setData();
- unset($template->form->error);
- if($this->nameTaken($template->form->log_username))
- {
- if($this->isBanned($template->form->log_username) == false || $this->isBanned($_SERVER['REMOTE_ADDR']) == false)
- {
- $mypenis = password_verify($template->form->log_password);
- if($this->userValidation($template->form->log_username, $core->hashed($mypenis)))
- {
- $this->turnOn($template->form->log_username);
- $this->updateUser($_SESSION['user']['id'], 'ip_last', $_SERVER['REMOTE_ADDR']);
- $template->form->unsetData();
- header('Location: ' . $_CONFIG['hotel']['url'] . '/me');
- exit;
- }
- else
- {
- $template->form->error = 'Details do not match';
- return;
- }
- }
- else
- {
- $template->form->error = 'Sorry, it appears this user is banned<br />';
- $template->form->error .= 'Reason: ' . $this->getReason($template->form->log_username);
- return;
- }
- }
- else
- {
- $template->form->error = 'Username does not exist';
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement