Jump to content

Session Variables - login


Recommended Posts

You can use the following in TPL files to check whether you are logged in:

{$logged}



or the following in PHP files:

{$cookie->logged}



Make sure that you add $cookie to the list of global variables at the top of the PHP function.

Link to comment
Share on other sites

i need add some file extra do presta and when i linked it in admin and i go to this file i want need acces only when im login!

because ppl form aoutiste put url with this addres and can do antyhink do in this file...

u know what i need?

Link to comment
Share on other sites

I don't understand. If you copy a URL from the PrestaShop Back Office and paste it in another browser where you aren't logged in, it should already realise that you aren't logged in and redirect you to the login page.

Link to comment
Share on other sites

  • 2 months later...

im trying to add the back end login to a front end page.. so that only employees accounts can access the fo page..

i see in the admin/init.php file

/* logged or not */
if (!$cookie->isLoggedBack())
   Tools::redirectLink('/login.php'.$url_redirect);



i edited the directory to reach the /adminfile/login.php...

it takes me to the bo login, but after i login it just takes me to bo index, and if i try to go to the fo page, it makes me login the bo again

Link to comment
Share on other sites

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