Advertisement:

Author Topic: Test if user logged in on integrated website  (Read 1284 times)

Offline papaworx

  • Semi-Newbie
  • *
  • Posts: 17
Test if user logged in on integrated website
« on: May 05, 2012, 11:28:19 AM »
I have progressively updated my installation. It used to be that I could 'require("SSI.php")' and then test, if a user was logged in. But now calling SSI, immediately redirects the user to the login page. How can I test for login status, without sending a user to login screen. I want to be able to treat logged in users differently than non-logged in users.

Offline Colin

  • Customizer
  • SMF Hero
  • *
  • Posts: 4,794
  • Gender: Male
  • SMF Customizer
Re: Test if user logged in on integrated website
« Reply #1 on: May 06, 2012, 01:04:12 PM »
Login Function:
Shows a login box only when user is not logged in.
Code: [Select]
<?php ssi_login(); ?>