close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

including based on authentication level

Thread began 8/17/2010 3:57 pm by Brad Lawryk | Last modified 8/19/2010 9:27 am by victor278184 | 1220 views | 5 replies |

Brad Lawryk

including based on authentication level

How can you include a plugin based on the user authentication level?

Brad

Sign in to reply to this post

anonymous

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

Sign in to reply to this post

Brad Lawryk

Thanks, Brian

Originally Said By: SOJO web
  Have you tried setting a session variable when someone log in to be set to the user level column in your database?  



Yes, I have session variables set on log in and they all work properly.

Originally Said By: SOJO web
  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.  



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

Sign in to reply to this post

anonymous

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

Sign in to reply to this post

Ray BorduinWebAssist

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.

Sign in to reply to this post
Did this help? Tips are appreciated...

victor278184

@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..

Sign in to reply to this post

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...