Jump to content

Can't login, not sure why?


Mutley

Recommended Posts

I redesigned a site, it had a members login area which I haven't touched ... but for some reason users can't login anymore (or never could).

 

It says:

Sorry, that login and password were not recognised. Please try again.

 

The code where this message is generated:

<?php
function processArgs()
{
$a = array();
$a['action'] = ema_CleanArgs('action');
$a['param']  = ema_CleanArgs('param');
return $a;
}
/////////////////////////////////////////////////////////////////////////////
/**
* Checks and processes valid logins.
*
* This function is responsible for administration security.
*/
function processLogin()
{
global $emag;

if (array_key_exists('oUser', $_SESSION))
{
        //User is logged in.
        //TODO verify some user data for additional security.
        return TRUE;
    }

switch ($emag['args']['action'])
{
case ACT_LOGIN:
        $userA = $emag['dbo']->getUserA(ema_CleanArgs('login'), ema_CleanArgs('pass'));
        if ($userA['user_username'] == NULL){
            echo "Sorry, that login and password were not recognised. Please try again.<br/>";
        }
        else
	{
        	// Successful login.
	    $_SESSION['oUser'] = new EMA_user($userA);
	    $emag['dbo']->updateUserLoginTime($userA['user_id']);
            return TRUE;
        }
        break;
?>

 

 

I can register and it inputs the data into the database fine and the SQL config file seems fine to, so what is causing this? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/54980-cant-login-not-sure-why/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.