Revision 1557
Added by Luisehahne over 14 years ago
! update editor.css for allcssand round (Tks to Ruebenwurzel)
- bugfix in forgot_form.php
| forgot_form.php | ||
|---|---|---|
| 18 | 18 |
// Must include code to stop this file being access directly |
| 19 | 19 |
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
|
| 20 | 20 |
// Check if the user has already submitted the form, otherwise show it |
| 21 |
if(isset($_POST['email']) && $_POST['email'] != "" && |
|
| 22 |
preg_match("/([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}/i", $_POST['email']))
|
|
| 21 |
if(isset($_POST['email']) && $_POST['email'] != "" ) |
|
| 23 | 22 |
{
|
| 24 | 23 |
$email = strip_tags($_POST['email']); |
| 25 | 24 |
// Check if the email exists in the database |
| ... | ... | |
| 29 | 28 |
if(($results = $database->query($sql))) |
| 30 | 29 |
{
|
| 31 | 30 |
if(($results_array = $results->fetchRow())) |
| 32 |
if($results->numRows() > 0) {
|
|
| 33 |
|
|
| 34 | 31 |
{ // Get the id, username, email, and last_reset from the above db query
|
| 35 | 32 |
// Check if the password has been reset in the last 2 hours |
| 36 | 33 |
if( (time() - (int)$results_array['last_reset']) < (2 * 3600) ) {
|
Also available in: Unified diff