close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Alternative Redirect on Login

Thread began 7/22/2012 12:05 am by canmor51406258 | Last modified 7/24/2012 6:14 am by Jason Byrnes | 1795 views | 4 replies |

canmor51406258

Alternative Redirect on Login

I want to direct new registrants to Insert Data page directly after registration via the login page. At the same time if current users login I want to direct them to Update Data page. Is it possible to have a choice of redirect pages on login?

Sign in to reply to this post

Jason ByrnesWebAssist

no, you cant have 2 redirects, but this can be done by setting a column in the users table to indicate whether they have performed the inert or not.

in the users table create a column named regComplete set the default value to 0

On the insert data page, update the regComplete column to 1 when the data is inserted.

On the login page, edit the Security Assist Authenticate user behavior, go to the Session Variables section and click the plus button, select the regComplete column to have it stored in a session on login, make note of the name that is used. also make note of the UserID session variable name.

For the sake of example, I am going to use "SecurityAssist_UserID" and "regComplete" going forward, you will need to make sure to use the correct session names when following the steps I outline

now you will need to create a new access rule, go to WebAssist -> Security Assist -> Manage Site Access -> Access Rules Manager

Set the name to Completed registration.

Create a condition, select the Restrict radio button. For Value, click the lightning bolt icon and select the SecurityAssist_UserID session variable binding. Set the Criteria to "=" and leave the compare to field blank.

Create another condition, select the Allow radio button. For Value, click the lightning bolt icon and select the regComplete session variable binding. Set the Criteria to "=" and set the Compare to field to 1


Now on the Update Data page, add the page access restriction to allow access only if the Completed registration rule passes.

Sign in to reply to this post

canmor51406258

Many thanks for that.

Sign in to reply to this post

canmor51406258

I follow the logic of what needs to be changed but cannot see how on login it will automatically redirect to the update page ( once regComplete is set to 1) when the redirect is set to the insert page. Could you please explain how this will happen?

Sign in to reply to this post

Jason ByrnesWebAssist

Set the Success redirect to point to the login page.

The logic works like this:
- The regComplete value is stored in a session at login
- if login is successful they are redirected to the User Update page
- On the user update page, you add an access restriction to only allow access if they have completed the insert page, if not, redirect them to the insert page.

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