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

Any way to forego e-mail verification step

Thread began 3/18/2010 12:41 pm by kelleypb318499 | Last modified 3/23/2010 4:39 pm by Eric Mittman | 1339 views | 11 replies |

kelleypb318499

Any way to forego e-mail verification step

It seems that using CAPTCHA would effectively negate spammers (though not humans using bogus e-mail addresses); thus, is there any simple way to forego the e-mail verification step without screwing up the whole application? That is, after registering you are immediately redirected to the protected page. Having to go and verify could turn off a lot of potential customers...

Sign in to reply to this post

Eric Mittman

One way that you could do this would be to add in the update server behavior from the user confirm page to make the user automatically verified.

On the user registration page just after the insert user server behavior that ends around line 119 you would add in the update server behavior from the confirm page. Once this server behavior has been added you will need to update two parts of it, the trigger and the value for the userID. Here is what the updated code should be like:

php:
<?php 
// WA Application Builder Update
if (isset($_POST["Register_x"])) // Trigger
{
  
$WA_connection $localhost;
  
$WA_table "users";
  
$WA_redirectURL "";
  
$WA_keepQueryString false;
  
$WA_indexField "UserID";
  
$WA_fieldNamesStr "UserEmailVerified|UserVerificationCode";
  
$WA_fieldValuesStr "1" "|" "".WA_RandomPassword(20truetruetrue"")  ."";
  
$WA_columnTypesStr "none,none,NULL|',none,''";
  
$WA_comparisonStr "=|=";
  
$WA_fieldNames explode("|"$WA_fieldNamesStr);
  
$WA_fieldValues explode("|"$WA_fieldValuesStr);
  
$WA_columns explode("|"$WA_columnTypesStr);
  
  
$WA_where_fieldValuesStr "".$_SESSION['UserID']  ."";
  
$WA_where_columnTypesStr "none,none,NULL";
  
$WA_where_comparisonStr "=";
  
$WA_where_fieldNames explode("|"$WA_indexField);
  
$WA_where_fieldValues explode("|"$WA_where_fieldValuesStr);
  
$WA_where_columns explode("|"$WA_where_columnTypesStr);
  
$WA_where_comparisons explode("|"$WA_where_comparisonStr);
  
  
$WA_connectionDB $database_localhost;
  
mysql_select_db($WA_connectionDB$WA_connection);
  if (!
session_id()) session_start();
  
$updateParamsObj WA_AB_generateInsertParams($WA_fieldNames$WA_columns$WA_fieldValues, -1);
  
$WhereObj WA_AB_generateWhereClause($WA_where_fieldNames$WA_where_columns$WA_where_fieldValues,  $WA_where_comparisons );
  
$WA_Sql "UPDATE `" $WA_table "` SET " $updateParamsObj->WA_setValues " WHERE " $WhereObj->sqlWhereClause "";
  
$MM_editCmd mysql_query($WA_Sql$WA_connection) or die(mysql_error());
  if (
$WA_redirectURL != "")  {
    if (
$WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
      
$WA_redirectURL .= ((strpos($WA_redirectURL'?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
    }
    
header("Location: ".$WA_redirectURL);
  }
}
?>



Once that part is done the next part would be to update the email message to remove the link and let the user know that they are registered. To do this you will need to edit the WA_Universal_Email > Email_Templates > registration.php. In here update lines 8, 9 and 10. Remove the code on these lines and put in your own message to the new users.

WA_Universal_Email > Email_Templates > registration.php

php:
<p>Please follow the link below in order to verify this email address:</p>
<p>
<?php echo($WAGLOBAL_Root_URL); ?>users_Confirm.php?ID=<?php echo(mysql_insert_id()); ?>&code=<?php echo($_SESSION['randomConfirm']); ?>



If you have a good working setup currently you should make sure to backup the files so that you can revert back if your updates don't work out.

Sign in to reply to this post

kelleypb318499

Thank you, Eric; that did the trick. Only other thing to do is change the ThankYou.php message about checking your e-mail. Cheers!

Sign in to reply to this post

Eric Mittman

Good catch, thanks for posting back with that.

Sign in to reply to this post

kelleypb318499

Only one problem: now I can't get beyond the users_Profile.php page and proceed to the protected page because it insists that I verify the email address...

Sign in to reply to this post

Eric Mittman

The update to the registration page should be updating the UserEmailVerified column for the newly registered user. It should be setting the column to 1. What is the value of this column when you check it for the new user?

When this column is set to one it should get you past any of the checks for a verified user. Please post back with what you discover for this and also include a copy of your updated page so that we can take a look to see if we can spot any problems.

Sign in to reply to this post

kelleypb318499

The setting under "Type" is tinyint(1); the setting under "Default" is 0.

Sign in to reply to this post

kelleypb318499

This is the updated code from my user_Registration.php page. I tried changing the "Default" value to "1" but it still won't let me proceed to the protected page...

Sign in to reply to this post

kelleypb318499

Now I'm getting PHP errors when registering new members. I'm overwriting all files to the default and will try again...

Sign in to reply to this post

Eric Mittman

Ok, let us know if there are any issues after trying this again. When I was asking about the value in the db I was looking for the value of the particular user you had registered with. If the user has a 1 on the UserEmailVerified column then they should pass any checks for verified users.

Sign in to reply to this post
loading

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