Adding additional user levels
Further to a question I asked in another thread, I am adding a level of complexity to my site security, and its not quite working.
I have modified the users_login.php page to take the user data from a members table and added a couple of new session variables to allow for the new user levels I have created.
(I have left the super administrator logic in place, and the wa_users table is still accessed for this role).
Heres my security logic...
User Levels are
Member
Administrator
Group Administrator
Super Administrator
Essentially, the Super Admin is the same as in the PowerCMS setup, and Administrator is analogous to the Admnistrator role from PowerCMS.
I have a users table with a column, userLevel, (Integer) which is 0 for Group admins, 1 for Admins and 2 for Members
I set up the access rules manager so that
all 4 user levels (userLevel = 0, 1 and 2) and SuperAdmin are able to access Members Pages
3 user levels (userLevel = 0 and 1) and SuperAdmin are able to access Administrators Pages
2 user levels (userLevel = 0) and SuperAdmin are able to access Group Administrators Pages
SuperAdmin only are able to access Super Administrators Pages (& regions).
- Is this the correct way of doing it ?
I thought I had this working ok, but am getting anomalous results when trying to log in as different users.
I am planning that each user level is potentially redirected to a different page on successful login.
Please find attached, a copy of my users_login.php page