Log in help

Sep 30, 2015
42
2
So I've never had this issue before so I'm curious on how to fix it. Every time you log out of my hotel and you try to log back in it says username not registered even though it is in database. I have to keep deleting and remaking an account just to get on. Would it just be the cms i'm using or is it a different problem?
 
Sep 30, 2015
42
2
Sorry; was like half awake when I wrote it this morning.
Anyways, after you register and join it's fine. (on the website)
If you get logged out and try to log back in, it says "username not registered"
even though you're in database.
So I have to delete the account and remake.
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Sorry; was like half awake when I wrote it this morning.
Anyways, after you register and join it's fine. (on the website)
If you get logged out and try to log back in, it says "username not registered"
even though you're in database.
So I have to delete the account and remake.
Okay do me a favor under your class.users.php found in your APP folder there is a function called login() go ahead and replace it with this and then try:
Code:
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)
                {
                    if($this->userValidation($template->form->log_username, $core->hashed($template->form->log_password)))
                    {
                        $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;
            }
        }
    }
 

Fr4n

Active Member
Dec 30, 2012
152
44
That error usually occurs when the hashtype has been changed, or if you swapped your CMS to a different one w/ a dirrerent hashing.
If not these then idk. :p
 

Users who are viewing this thread

Top