Jump to content

How to set $cookie as login with user data


balaji153

Recommended Posts

Hi,

 

I am using Prestashop 1.4.

 

we need some custom login page.

 

so i create a custom login page and authenticate with basic php condition.

 

 

include(dirname(__FILE__).'/config/config.inc.php');

 

include(dirname(__FILE__).'/init.php');

 

if($cookie->isLogged()){

 

header('Location: http://promotionalproductexperts.com.au');

}

 

if($_POST['emailAddress']=='[email protected]' && $_POST['password'] == 'password123'){

 

$cookie->logged = 1;

 

//header('Location: http://promotionalproductexperts.com.au');

 

}

 

include(dirname(__FILE__).'/header.php');

 

$smarty->display(_PS_THEME_DIR_.'login.tpl');

 

include(dirname(__FILE__).'/footer.php');

But here $cookie->isLogged() is not set as logged in .

 

Please help me

Link to comment
Share on other sites

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...