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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Remember Me facility on login?

Thread began 4/29/2015 4:04 am by Nathon Jones Web Design | Last modified 5/01/2015 1:09 pm by Ray Borduin | 1199 views | 6 replies |

Nathon Jones Web Design

Remember Me facility on login?

Using SecurityAssist (non-MySQLi whilst we wait for the promised upgrade) and I'd like to include a "Remember Me" function so that a user is kept logged in but I don't see that within the extensions options.

Any advice on how to implement?

I looked at this post from Jason...

Originally Said By: Jason Byrnes
  use a wizard created page as an example.

the basic gist is to add the checkbox for remember me and auto log in, set the checked value to 1 for each.

add set cookie behaviors to store the entered Username, Password, and Remember Me values using the remember me element as the trigger. ad another set cookie behavior to store the auto login value as a cookie using the auto login checkbox as a trigger.

then add another Authenticate user behavior using the auto login as the trigger, and use the Username and password cookies as the login values.

If you look at a login page created by the wizard for reference, it will make more sense.  



Firstly... "...add the checkbox for remember me and auto log in, set the checked value to 1 for each."
Why would you have two checkboxes? I've not experienced that on any website with a login facility, simply a single "Remember me" checkbox usually - am I misunderstanding this?

Secondly... "add set cookie behaviors to store the entered Username, Password, and Remember Me values using the remember me element as the trigger."

When I move to set the cookie values, there is no option in the list of triggers relating to the checkbox on the page. There is only:
any form post
before page load
current page submit
Button: signinBTN pressed (signinBTN being my form submit button)

I'm clearly not understanding the process here. Hope someone can help.
Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

The best way to do this is just check the option in the security assist wizard. I've attached a screen grab of the page where the option appears.

The two checkboxes are for "remember me" and "auto login"... remember me just remembers the username and you still have to type in the password. "Auto Login" will actually bypass the login screen and the person stays logged in.

You can click the lightning bolt to use custom triggers. Just choose the associated checkbox field.

I'd strongly suggest using the wizard to do this for you on another page, and then you can reverse engineer it from there. You could even copy and paste things like the checkboxes and store session server behavior code.

Sign in to reply to this post

Nathon Jones Web Design

I haven't been using the wizard. If Dreamweaver is likely to screw up any WebAssist code because of weights then I don't really see the point because we'll end up having to hand code it anyway.

So, to test my theory, I've added a SecurityAssist Authenticate User behaviour on the following page and, lo and behold, it doesn't work:
http://www.portpatrick.me.uk/admin/index.php

Worst still, it's appending all of the security credentials into a querystring in the address bar!

Also, when I re-enter the dialog for the SecurityAssist Authenticate User behaviour and then exit it, it adds another:
<?php
@session_start();
?>

...to the top of the page so we're left with:
<?php
@session_start();
?>
<?php
@session_start();
?>

:(

No idea what's going on. Our database is connected. We have the right database fields binded to the sign in form. We are using the correct username and password credentials to sign in.

Hope you can help.
Thank you.
NJ

EDIT: This appears to be working now - I have no idea what I've done - but now that I'm logged in I can see no way to secure the private pages?
Would appreciate some help because I am finding SecurityAssist to be a real headache compared to the DW "Restrict Access to Page" behaviour but I want to maintain the WebAssist extension for the additional features that I believe it has.

Sign in to reply to this post

Ray BorduinWebAssist

The ordering of the code issue is only a problem when applying server behaviors individually. Since you apply them one at a time, Dreamweaver doesn't know the correct order you intend. A larger wizard doesn't have that problem because we are able to apply all the server behaviors at once in the correct order instead of asking Dreamweaver to figure out the order when applying them individually.

You secure the pages with the new MySQLi "Restrict Access to Page" server behavior just like you would with the old Dreamweaver version.

Sign in to reply to this post

Nathon Jones Web Design

...and the MySQLi "Restrict Access to Page" behaviour integrates with Security Assist, is that right?

The MySQLi "Restrict Access to Page" behaviour as three options:
Trigger
Authentication
Failed Redirect

The Authentication dropdown is blank?

EDIT:

Oh jeezus...so basically the WebAssist SecurityAssist extension has nothing to do with the WebAssist > MySQLi > Authenticate User extensions. They don't communicate with each other - they aren't compatible.

God help anyone who hasn't had 5+ years experience of WebAssist. They'd have you pulling your hair out.

This is all getting a bit silly Ray, wouldn't you agree? These extensions should be compatible with each other by now.

Oh, and deleting the WebAssist SecurityAssist extension leaves this at the top of the page:
<?php
@session_start();
?>

...despite there being NO other code above the DOCTYPE. Absolutely sod all to do with "weight".

Sign in to reply to this post

Nathon Jones Web Design

Originally Said By: Ray Borduin
  The ordering of the code issue is only a problem when applying server behaviors individually. Since you apply them one at a time, Dreamweaver doesn't know the correct order you intend. A larger wizard doesn't have that problem because we are able to apply all the server behaviors at once in the correct order instead of asking Dreamweaver to figure out the order when applying them individually.  



Yes, but if you have lots of other code on your page then it's 100% feasible that the wizard could install it before, after or right in the middle of that code thus causing problems. The wizard may well put the WebAssist code in the correct order but you are still at the mercy of Dreamweaver in terms of "weight" by your own account.

Originally Said By: Ray Borduin
  You secure the pages with the new MySQLi "Restrict Access to Page" server behavior just like you would with the old Dreamweaver version.  



We're using WebAssist SecurityAssist. Does it not have a facility to secure pages after login?

Thank you
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Security Assist has a different mechanism. Sorry earlier you said you were using MySQLi.

In SecurityAssist you go to WebAssist->Security Assist->Manage Site Access->Access Pages Manager and you can add restrictions to multiple pages at once.

To do it page by page you can apply the server behavior: WebAssist->Security Assist->Secure Page (it works just like the Dreamweaver restrict access to 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...