| Can I check if a staff member is logged in? -
20-05-2009, 03:41 PM
Since there doesn't seem to be a way to set up a LoginShare for the staff and admin side, we set up a script that will handle our external authentication something like this:
(I will mainly refer to the staff side, but the process for the admin side is the same.)
1. Once external authentication is performed, look up a user's username and password.
2. Set $_SESSION['staff_in'] to true.
3. POST that data to /staff/index.php along with remember set to 1 and _ca set to login.
When the user goes to /staff/index.php, I added a line that will redirect them back to our external authentication if $_SESSION['staff_in'] is not set. At some point, this variable gets out of sync with SupportSuite's session. The result is that we get a "Your session has expired" message at some point and have to clear cookies to be able to log in.
It would be easier if I had a way to check if the user is logged in instead of keeping track of a session variable. Is there any way to do this?
|