close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Adding additional user levels

Thread began 6/09/2013 3:03 pm by CraigR | Last modified 6/10/2013 2:59 pm by CraigR | 418 views | 5 replies

CraigRBeta Tester

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

Attached Files
users_login.zip

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...