View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

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 stuff269776 | 1776 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" />

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