QueueMetrics > Improving QueueMetrics
Forgot Password option
framirez:
Is it possible to get a forgot my password option in QueueMetrics? We are currently running version 1.4.7.1
Would it be possible to script it out on our end? If yes what would I be looking at as far as scripting languages and details to get it to work with the existing software?
Any help would be greatly appreciated.
Thanks,
Francisco Ramirez
QueueMetrics:
If a number of people are interested, we could add this in.
framirez:
I worked on getting the following. Haven't tested it yet tho, will be doing that tomorrow and reporting back...
<html>
<form method="post" action="forgot_password.php">
<table border="0" width="100%" color="gray">
<tr><td align="right">
<img src="sm_qm_logo.gif">
</td></tr>
</table>
<h1>Forgot your password?</h1> <p />
Enter your Username: <br/>
<input type="text" name="username" size="50" maxlength="50"/>
<input type="submit" value="Send my password" />
</form>
</html>
<?php
$username = $_POST['username'];
$dbname = ""dbname"";
$conn = mysql_connect ('localhost','"user"','"password"') or
die ('cannot connect to database error: '.mysql_error());
mysql_select_db ($dbname);
if($username != "")
{
$result = mysql_query("select * from users where name = '$username'") or die(mysql_error());
$count=mysql_num_rows($result);
if($count != 1){
echo "no user with this username";
$alert = "We're sorry, but we could not find a user with that username.";
}
else {
echo "email with password was sent";
$alert = "Your username and password have been emailed to you.";
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$username = $row['username'];
$password = $row['password'];
$msg = "Your login information is:\n\n";
$msg .= "Username: $username\n";
$msg .= "Password: $password\n";
mail($user_email, "Login Information", $msg, "From:helpdesk@cashnetusa.com");
}
} else {
echo "user email not set"; }
?>
Please vote so we can get this as an out of the box feature.
QueueMetrics:
yes I think this would work.
If you don't mind, I would add this to the user-contribuited scripts for QM.
framirez:
I want to add it, however; I am working on getting a more secure way to only ask for the username and have the script add the @domain to create the send to email...
Navigation
[0] Message Index
[#] Next page
Go to full version