Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.