Project

General

Profile

« Previous | Next » 

Revision 2052

Added by darkviper almost 11 years ago

  1. account/forgot_form : fixed fix...

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
29 Dec-2013 Build 2052 Manuela v.d.Decken(DarkViper)
15
# account/forgot_form : fixed fix...
14 16
29 Dec-2013 Build 2051 Manuela v.d.Decken(DarkViper)
15 17
# account/preferences_form : language selection fixed
16 18
# account/forgot_form : password generation fixed
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.4');
54
if(!defined('REVISION')) define('REVISION', '2051');
54
if(!defined('REVISION')) define('REVISION', '2052');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/account/forgot_form.php
42 42
    		$email = '';
43 43
    	} else {
44 44
        // Check if the email exists in the database
45
        	$sql  = 'SELECT `user_id`,`username`,`display_name`,`email`,`last_reset`,`password` '.
46
        	        'FROM `'.TABLE_PREFIX.'users` '.
47
        	        'WHERE `email`=\''.$wb->add_slashes($email).'\'';
45
        	$sql  = 'SELECT `user_id`,`username`,`display_name`,`email`,`last_reset`,`password` '
46
        	      . 'FROM `'.TABLE_PREFIX.'users` '
47
        	      . 'WHERE `email`=\''.$wb->add_slashes($email).'\'';
48 48

  
49 49
        	if(($results = $database->query($sql)))
50 50
        	{
......
59 59
        				$old_pass = $results_array['password'];
60 60
        			// Generate a random password then update the database with it
61 61
        				$new_pass = $pwh->createNew();
62
        				$sql = 'UPDATE `'.TABLE_PREFIX.'users` '.
63
        				       'SET `password`=\''.md5($new_pass);
64
        				           '`last_reset`='.time().' '.
65
        				       'WHERE `user_id`='.(int)$results_array['user_id'];
62
        				$sql = 'UPDATE `'.TABLE_PREFIX.'users` '
63
        				     . 'SET `password`=\''.md5($new_pass).'\', '
64
        				     .     '`last_reset`='.time().' '
65
        				     . 'WHERE `user_id`='.(int)$results_array['user_id'];
66 66
        				unset($pwh); // destroy $pwh-Object
67 67
        				if($database->query($sql))
68 68
        				{ // Setup email to send

Also available in: Unified diff