More Session during login
There are two tables:
Users & Companies
Users: ID, Name, Email, Password, ComID & etc...
Companies: ID, CompanyName, CompanyStatus
CompanyStatus value by default is 1.
So lets say i want to ban all users to login, under a company by changing CompanyStatus to '2'
So how do we do this?
FYI, During User Login following session are stored: ID(from Users), CompanyID(from users)
Now i need to store session from different db ie Companies.
So how many SecurityAssist Authenticate user i need to create on login page?
Currently i added one SecurityAssist Authenticate user. then under DB tab, table as Companies, ID = <?php echo $_SESSION['CompanyID']; ?>
Under Session tabs CompanyStatus = CompanyStatus (Session Name)
Then from SE rule, i added restrict <?php echo $_SESSION['CompanyStatus']; ?> whose CompanyStatus = 2.
I might have missed something. Please help. Login page attached.