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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Email Password - add fields besides email?

Thread began 8/18/2009 8:56 pm by stuff269776 | Last modified 8/26/2009 12:14 pm by Jason Byrnes | 2031 views | 3 replies |

stuff269776

Email Password - add fields besides email?

My "Email Password" page is now working great - except that I have a problem with multiple registered users who use the same email address (families with a shared email address, for example). They get the first user ID / password in the database with that email address instead of the specific one that actually applies to the particular individual.

Unfortunately, changing the membership rules to require unique email addresses is out of the question so I have to change my password request form to include both last name and first name in addition to email address.

I've added the new fields to the form (see code below) and should be able to add the info to the email body text but can anyone please tell me how to add the extra fields to SecurityAssist's search/filter code? Is the code adaptable to this additional requirement?

Below is the relevant code (with generic replacements for site-specific identifiers). The site is hosted on bluehost.com (Linux, MySQL 5.0, PHP 5.2).

Thank you,

J.

<?php require_once('../Connections/connSAMPLE1.php');?>
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
function WA_SecurityAssist_Email_1_SendMail($WA_Auth_Parame ter){
$WA_MailObject = WA_SecurityAssist_Definition("mail.testcase.org"," 25","SAMPLE@testcase.org@ymail.testcase.org","","" ,"");
$WA_MailObject = WA_SecurityAssist_SendMail($WA_MailObject,"","","" ,$WA_Auth_Parameter["toAddress"],"",$WA_Auth_Parameter["fromAddress"],$WA_Auth_Parameter["subject"],$WA_Auth_Parameter["mailBody"]);
$WA_MailObject = null;
}// WA_SecurityAssist_Email_1_SendMail
?>
<?php
if(isset($_POST["Send_x"])){
//WA SecurityAssist Email object="Mail for Linux"
$WA_Auth_Parameter = array(
"connection" => $connSAMPLE1,
"database" => $database_connSAMPLE1,
"tableName" => "Equipment",
"filterColumn" => "Email_Address",
"columnValue" => "".((isset($_POST["emailAddress"]))?$_POST["emailAddress"]:"") ."",
"columnType" => "text",
"usernameColumn" => "Member_ID",
"passwordColumn" => "userP",
"selectColumns" => array(""),
"sessionVariables" => array(""),
"successRedirect" => "SAMPLE_LogIn.php",
"failRedirect" => "SAMPLE_EmailPW.php",
"keepQueryString" => TRUE,
"toAddressColumn" => "Email_Address",
"fromAddress" => "SAMPLE@testcase.org",
"fromAddressDisplay" => "SAMPLE Association ",
"subject" => "SAMPLE Password Request",
"mailBody" => "User name: [Member_ID]\nPassword: [userP]",
"emailFunction" => "WA_SecurityAssist_Email_1_SendMail"
);

WA_Auth_ForgotPassword($WA_Auth_Parameter);
}
?>

AND HERE IS THE REVISED EMAIL PASSWORD REQUEST FORM:

<div id="ForgotPWContainer" class="WAATK">
<form action="SAMPLE_EmailPW.php" method="post" name="WAATKForgotPWForm" id="WAATKForgotPWForm">
<h1>&nbsp;</h1>
<table class="WAATKDataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th>Email:</th>
<td><input type="text" name="emailAddress" /></td>
</tr>
<tr>
<th>First Name:</th>
<td><input type="text" name="First_Name" id="First_Name" /></td>
</tr>
<tr>
<th height="32">Last Name:</th>
<td><input type="text" name="Last_Name" id="Last_Name" /></td>
</tr>
</table>
<div class="WAATKButtonRow">
<p>
<input type="image" hspace="0" vspace="0" border="0" name="Send" id="Send" value="Send" alt="Send" src="../WA_SecurityAssist/images/Slate/Refined_send.gif" />

Sign in to reply to this post

Jason ByrnesWebAssist

No, the security assist email does not support looking up an account by more than one column.

In the case where you are allowing for users to register with the same email address, your login should use a unique username instead of the email address. The email password page can them use the user name to look up the account.

Sign in to reply to this post

stuff269776

Thanks for letting me know. If SecurityAssist (and Dynamic Suite overall) can't handle additional fields in the query used for a "Forgot Password" page then I'll need to create a "Forgot Password" page from scratch.

For this website, each registered member is indeed assigned a unique member ID that is used for login - but if they've forgotten the password then they've probably forgotten the numeric ID so it's not much help on the "Forgot Password" page. I'm working with an existing membership with hundreds of registered members so I can't reasonably ask my client to change their existing set-up.

Thank you for the info.

J.

Sign in to reply to this post

Jason ByrnesWebAssist

Yes, you will need to create the forgot password manually in this case.

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