[Mapbender-commits] r3301 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Dec 11 11:41:21 EST 2008
Author: christoph
Date: 2008-12-11 11:41:21 -0500 (Thu, 11 Dec 2008)
New Revision: 3301
Modified:
trunk/mapbender/http/php/mod_forgottenPassword.php
Log:
http://trac.osgeo.org/mapbender/ticket/341
Modified: trunk/mapbender/http/php/mod_forgottenPassword.php
===================================================================
--- trunk/mapbender/http/php/mod_forgottenPassword.php 2008-12-11 16:37:54 UTC (rev 3300)
+++ trunk/mapbender/http/php/mod_forgottenPassword.php 2008-12-11 16:41:21 UTC (rev 3301)
@@ -64,19 +64,20 @@
$upd = false;
if ($_POST["sendnew"]) {
- if ($_POST["username"]) {
+ if ($_POST["username"] && $_POST["email"]) {
$id = $admin->getUserIdByUserName($_POST["username"]);
+ $mailAddressMatch = ($admin->getEmailByUserId($id) == $_POST["email"]) && ($_POST["email"] != '');
$user_id = $id;
- if ($user_id) {
+ if ($user_id && $mailAddressMatch) {
$upd=true;
}
else {
- echo "Your username could not be found. Please try again!<br><br>";
+ echo "Either your username could not be found or you have registered another or no mail address.<br><br>";
}
}
else {
- echo "Please fill in your username.<br><br>";
+ echo "Please fill in your username and mail address.<br><br>";
}
}
@@ -130,14 +131,21 @@
#echo "<fieldset><legend>Passwort vergessen ?</legend>";
#echo "<form name='form1' action='" . $PHP_SELF . "' method='post'>";
echo "<form name='form1' method='post'>";
- echo "<table cellpadding='5' cellspacing='0' border='0'><tr>";
- echo "<td>";
+ echo "<table cellpadding='5' cellspacing='0' border='0'>";
+ echo "<tr><td>";
echo "Username:";
echo "</td>";
echo "<td>";
echo "<input type='text' name='username' value=''>";
echo "</td>";
echo"</tr>";
+ echo "<tr><td>";
+ echo "E-Mail:";
+ echo "</td>";
+ echo "<td>";
+ echo "<input type='text' name='email' value=''>";
+ echo "</td>";
+ echo"</tr>";
echo"<tr><td>";
echo "<input type='hidden' name='upd' value=''>";
echo "<center><br><input type='submit' name='sendnew' value='Order a new Password'></center>";
More information about the Mapbender_commits
mailing list