close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Accessing Password Protected Folders

Thread began 11/14/2010 4:28 pm by dgwhit288523 | Last modified 11/30/2010 8:45 am by Jason Byrnes | 6687 views | 29 replies |


Accessing Password Protected Folders

The Registration Solution Pack has been successfully installed and works with no issues.

I have four folders in the root section of the site, one of which I want to be able to assign in the admin section for a specific user to be able to access. (four different levels of dealer pricing for products).

Once a dealer has registered, and the administrator has been notified of the registration, how can the administrator edit the individual registration file, so when the dealer clicks on the link to go to the protected page/section, the link will direct him to that folder and an index.htm page within the folder?

It would be great to have that as an edit function for the administrator for each user where the adminstrator could assign a level of access which would accomplish this.
For example, if there was an edit function on the user edit page, where the admin could select a level 1,2,3,4 and have the user directed to that directory/page it would be a snap.

Once assigned the path would be, for example, folder_1/index.htm.

Is something like this possible?

Sign in to reply to this post


Using Security Assist

Although I have not used the Security Assist Extension except in the tutotial, can I use the files in the registration soultion pack and go through the process of setting up the four user levels for doing what I have described above?

If so, once done, how would I then assign the specific directory and file that a user would be taken to based on that level?

For example, if a user were assigned Level 2 by the administrator, once that user logs in, how would you assign that level to go to the specific directory?

Once my cleint has received an email confirmation that a user has registered, I would want to make it easy for the client to sign in at a predetermined admin level, go to that user page, click on the appropriate level for the user and be done with it.

I believe that I have all of the extensions installed that are necessary to complete the task that I have described if it is possible to accomplish this without custom coding?

Sign in to reply to this post

Jason ByrnesWebAssist

The users registration solution pack is not configured for User level authentication, so it will take a little hands modification to get this working.

1) You will nee to add a user level column to the users table.

2) The User Level tutorial will help you get the user level information stored in a session variable.

the redirect will take a little coding.

on the profile page, you would add an if statement to redirect to the proper page based on the userLevel Session, for example:


if($_SEESSION['userLevel'] == 1) {
header("location: folder/page_1.php");
$_SEESSION['userLevel'] == 2) {
header("location: folder/page_2.php");

For the admin portion, you would need to use data assist to create the page where the administrator could edit the user lavel for the users.

Sign in to reply to this post


Protected Folers

In looking at the code that you sent me, I presume that where you have folder/page_1.php, I would change that to point to the secured directory for that level in the case of a folder specifically for agents, such as:

if($_SEESSION['userLevel'] == 1) {
header("location: agent/index.html");

Is this correct?

I am having some difficult creating an admin page for the admin to assign a level to once the customer has registered. Since I haven't had much experience using data assist, am going back to see if there is a tutorial to use that shows how this is done. If you have any links as examples, would appreciate you sending it to me.

Thanks for all your help!

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct.

There isnt a tutorial specific to user level management with data assist, but it would be a simple set of data assist pages created for the users table.

Sign in to reply to this post


Data Assist Pages

This post has been deleted.


Additional Forms

This post has been deleted.


user_profile page

Jason, my client requested that an additional input field be added to registration (Company), so I manually added these fields (UserCompanyand the User_Level) to the database and the user_update.php and user_details.php files. Both appear to be functioning properly and this data can be edited (added) using these two files. I am looking at the other files to see which ones need to be edited as well. In the over-all scheme of things, is this an acceptable method versus creating a new form for this? Is this what you were referring to in terms of adding a form?

The intent as I mentiond above, is for the registrant to be taken directly to his protected folder once the appropriate level has been inserted into the database and upon upon log-in afterwards. I have added the snippet of code above for each dealer level on the user_profile.php file.

As you know, once sucessfully logged in, there is a link in the present file at the bottom of the page for taking the user to the protected_page.php file. In addition to adding the code described above, what other modifications need to be made on this page to make this work? I presume this link should be removed or modified? At present, just by adding the code to this page, it does not work.

Please advise.


Sign in to reply to this post


Session Variable

Using Security Assist, Authenicate User Server Behavior, I have assigned 5 levels using Access Rules Manager to the Users_LogIn.php page. When logging in now UsersLogin.php, I get the error below. I believe that I have set the server info appropriately when Dreaweaver asked for it when saving the file. Are there any other folders or files that need to be uploaded other than the user_profile.php file and the Users_Login.php file?

I have attached a zip file with the two pages.

Could you give me a little help here?

The login information provided is not valid. Please try again.
Email address A value is required.Invalid format.
Password A value is required.Minimum number of characters not met.The password doesn't meet the specified strength.
(forgot your password?)
Remember me
Auto log in

Attached Files
Sign in to reply to this post

Jason ByrnesWebAssist

Here are the issues i see with your page:

1) there are 2 Security Assist Authenticate User behaviors on the page, one is used when the login form is filled out, the other is used for the auto login.

Only the auto login behavior has been modified to store the user level session, you will need to modify the other as well.

2) You have contradictory server validations. You have one validation that is using a regular expression to Force only numbers, and another regular expression to force only letters. If one passes, the other will fail.

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





Ease of use


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