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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

double opt in hit a brick wall.....

Thread began 7/21/2016 8:14 am by Jamie | Last modified 7/25/2016 4:57 pm by Ray Borduin | 448 views | 7 replies |

Jamie

double opt in hit a brick wall.....

Hey Ray

Just been going through the double opt in tutorial and hit a couple of snags (the last of which has stopped me in my tracks). Am not sure if its because I made the rsVerify recordset using mysqli rather than mysql but here goes:

First one:
Last bit of this section this section, 'Reset the user's session variable to verified status' - when I get to step 3, 'rsVerify is not empty' is not an option in the drop down

Second one:
Got through to this section I get to step 4 and clickin on the + does nothing at all

Have attached the user-confirm and login pages if that helps.

Thanks

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

You can trigger off of the ->TotalRows property of the MySQLi recordset to see if it is empty. It will have to be entered manually.

You don't need to use a plus button to add session variable values in the MySQLi version, just specify a session variable name for that field.

Sign in to reply to this post

Jamie

ok, thanks - thats got me through that bit.

  You can trigger off of the ->TotalRows property of the MySQLi recordset to see if it is empty. It will have to be entered manually.  



like this?

<?php
@session_start();
if(($rsVerify -> TotalRows != "")) {
$_SESSION["emailVerified"] = "1";
}
?>



Now in this section am at line 67 and when I click the lightning bolt, there doestn seem to be any Recordset (SecurityAssistusers) to select from... have attached screenshot

Sign in to reply to this post

Ray BorduinWebAssist

<?php
@session_start();
if($rsVerify->TotalRows) {
$_SESSION["emailVerified"] = "1";
}
?>



The binding might not be there on the email page... get the correct syntax from the page that you have applied the email server behavior on directly and copy and paste it to the email body.

Sign in to reply to this post

Jamie

Ok thanks to both answers.

I have it all uploaded now. Few things (sorry for the list)

  1. on registration page, it has an input field for UserGroupID which is required...is this value needed and if so what for?
  2. shouldnt the passwords be hashed? if so, how do you go about doing that?
  3. how would I go about setting it so that once the password is verified, my client is notified that this has happened and then has to accept (or not) and make the user live?
  4. I couldnt find any reference to logout so not sure how to accomplish that?
  5. when going to userupdate.php
    a) the page doesnt show and b) it empties the row in the db for that logged in user

  6. the verification email is sent through, but when clicked on and going through to the user-confirm.php page i get this error:
Notice: Undefined variable: rsVerify in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 11

Notice: Trying to get property of non-object in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 11

Notice: Undefined variable: PowerCMSConnection in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 80

Notice: Undefined variable: database_PowerCMSConnection in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 102

Warning: mysql_select_db() expects parameter 2 to be resource, null given in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 103

Warning: mysql_query() expects parameter 2 to be resource, null given in /home/motle7bk/public_html/clients/xxxx/user-confirm.php on line 108

(page attached)

many thanks

Jamie

Sign in to reply to this post

Ray BorduinWebAssist

1) It isn't necessary
2) You can hash the password when you enter it on the insert
3) Have another email go to the admin on the verify page and then include a link to the admin user update page where they can actually manually update the verified field to allow access.
4) Just add a link to a logout page with the logout user server behavior applied before page load
5) Change your page update trigger to use the form submit or button press.
6) There is a reference to a recordset on line 11 but that recordset isn't created until line 76... you will have to move the save session code down below the recordset.

It looks like you still have standard mySQL update server behaviors, not mySQLi... but the connection include file isn't on the page. You will have to add a reference to the PowerCMSConnection include to the page probably just below the DBConnection file on line 6.

Sign in to reply to this post

Jamie

Thanks re all of that. Will look at 2) and 3) in the morning with a fresh head!

quick q in the meantime, if you select Remember my information or Log me in automatically on login, how long does the session/cookie last for and can I force it to unset?

Sign in to reply to this post

Ray BorduinWebAssist

There are going to be set cookie server behaviors on the top of the page that saves the cookies and sets the time. You can unset them by setting them to blank values or setting them to expire in the past on another 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...