including based on authentication level
How can you include a plugin based on the user authentication level?
Brad
How can you include a plugin based on the user authentication level?
Brad
Brad,
Have you tried setting a session variable when someone log in to be set to the user level column in your database?
For example, you could set a session variable named "userlevel" that gets it's info from the user level column. Let's pretend in my case, I login and I am an admin.
So, you could trigger based on that checking if $_SESSION['userlevel'] is equal to admin then use pluginA. If $_SESSION['userlevel] is equal to user, than use pluginB, etc.
Regards,
Brian
Thanks, Brian
Yes, I have session variables set on log in and they all work properly.
Thats the problem, I see no where to add the trigger? I get a drop menu with some options like if user is logged in, but I need him to be logged in and be = to the admin level I set. So I understand what you are saying but just don't know where to put that info.
Thanks again,
Brad
If you are using a Dynamic Plugin, you can set the trigger right in the dialog box.
You first define the trigger variable as $_SESSION['userlevel'] and then hit the + sign to add it. Then select a plug in source and then enter the level you want in the variable value box. That way it will only pull the plug in if the trigger variable is equal to the value you enter.
I think you would only need to check for the userlevel session variable because that would also prove that the person is logged in as the only way it could get set was if they successfully logged in.
Best regards,
Brian
You could either use one static plugin and set the triggers individually with the rules from SecurityAssist, or you could use dynamic plugins and use the Session variable as the trigger as Brian suggests.
@Brad Lawryk, This is where one should begin to "play" on code level, WA's code is not hard to track, with some code tweaking as suggested by ray and sojo ,you'll have what you want..
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.