ianhaney Posted January 2, 2016 Share Posted January 2, 2016 Hi So sorry, I hope this is the last issue I come across and need help I got one side for employers and one side for candidates and both sides were using memberID so what was happening was when I was logged in as a employer, it would log in as a candidate as well so thought that was because both were using memberID so left employers as memberID and changed candidates to userID thinking would solve it but has not so only other thing I can think of is because they are using sessions to store the memberID and userID in a session or could it be of the following line being in both employer and candidate php file script if(!$user->is_logged_in()){ header('Location: candidate-login.php'); } if(!$user->is_logged_in()){ header('Location: employer-login.php'); } or can I use the same $user used in both php files or would I need to change $user in candidate side so is different to the employer side Quote Link to comment https://forums.phpfreaks.com/topic/300110-userid-and-memberid-sessions-issue/ Share on other sites More sharing options...
ginerjm Posted January 2, 2016 Share Posted January 2, 2016 Huh? That has to be longest sentence I have ever read. And I don't understand it. Really? You can't describe your problem any better? Quote Link to comment https://forums.phpfreaks.com/topic/300110-userid-and-memberid-sessions-issue/#findComment-1529019 Share on other sites More sharing options...
ianhaney Posted January 3, 2016 Author Share Posted January 3, 2016 Sorry I'll try to explain it better I login in as userA in the candidate side then if I go to login page on employee side, it thinks I am already signed in to the employee side and has taken me to the employer profile page on employee side it thinks I am logged in as userA from when I logged into the candidate side, I have attached a couple of screenshots of me logged in on candidate profile side and employer profile side Hope that makes it easier to understand the issue I got Quote Link to comment https://forums.phpfreaks.com/topic/300110-userid-and-memberid-sessions-issue/#findComment-1529020 Share on other sites More sharing options...
Solution mac_gyver Posted January 3, 2016 Solution Share Posted January 3, 2016 you should have one set of users and one login. each user would have a role/type stored for him/her that would determine what they can do or see on any particular web page. Quote Link to comment https://forums.phpfreaks.com/topic/300110-userid-and-memberid-sessions-issue/#findComment-1529022 Share on other sites More sharing options...
ianhaney Posted January 3, 2016 Author Share Posted January 3, 2016 Hi Sorry been quiet, I have now sussed and sorted this issue Quote Link to comment https://forums.phpfreaks.com/topic/300110-userid-and-memberid-sessions-issue/#findComment-1529039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.