Jump to content

[SOLVED] How can you check if user is logged in?


Recommended Posts

  • 1 year later...
By the following smarty call :

{if $logged}
.....
{/if}


Your code is correct, but only if you use it is *.tpl file. However, if you would like to check user status in *.php files, you should use:
if ($cookie->isLogged()) {
............
} else {
.................
}



I hope for someone it will be useful

  • Like 3
Link to comment
Share on other sites

  • 1 year later...

Is there a way to check the logged in status from outside the prestashop? e.g. reading from a real cookie or ist there an API?

 

I have a Drupal CMS next to the Shop running, where I d'like to show the login-status..

Link to comment
Share on other sites

×
×
  • Create New...