|
@@ -40,8 +40,7 @@ if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'recover') {
|
40
|
40
|
FROM users_main AS m
|
41
|
41
|
INNER JOIN users_info AS i ON i.UserID = m.ID
|
42
|
42
|
WHERE i.ResetKey = '".db_string($_REQUEST['key'])."'
|
43
|
|
- AND i.ResetKey != ''
|
44
|
|
- AND m.Enabled = '1'");
|
|
43
|
+ AND i.ResetKey != ''");
|
45
|
44
|
list($UserID, $Email, $Country, $Expires) = $DB->next_record();
|
46
|
45
|
|
47
|
46
|
if (!apc_exists('DBKEY')) {
|
|
@@ -121,8 +120,7 @@ if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'recover') {
|
121
|
120
|
$DB->query("
|
122
|
121
|
SELECT
|
123
|
122
|
Email
|
124
|
|
- FROM users_main
|
125
|
|
- WHERE Enabled = '1'");
|
|
123
|
+ FROM users_main");
|
126
|
124
|
while(list($EncEmail) = $DB->next_record()) {
|
127
|
125
|
if ($_REQUEST['email'] == DBCrypt::decrypt($EncEmail)) {
|
128
|
126
|
break; // $EncEmail is now the encrypted form of the given email from the database
|
|
@@ -135,8 +133,7 @@ if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'recover') {
|
135
|
133
|
Username,
|
136
|
134
|
Email
|
137
|
135
|
FROM users_main
|
138
|
|
- WHERE Email = '$EncEmail'
|
139
|
|
- AND Enabled = '1'");
|
|
136
|
+ WHERE Email = '$EncEmail'");
|
140
|
137
|
list($UserID, $Username, $Email) = $DB->next_record();
|
141
|
138
|
$Email = DBCrypt::decrypt($Email);
|
142
|
139
|
|