mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 01:25:21 +02:00
More "LIMIT 1" removed - and some other SQL improvements.
This commit is contained in:
parent
9f4ef7c105
commit
6e7bd68ebb
34 changed files with 271 additions and 258 deletions
|
@ -25,7 +25,7 @@ function lostpass_post(&$a) {
|
|||
$new_password = autoname(12) . mt_rand(100,9999);
|
||||
$new_password_encoded = hash('whirlpool',$new_password);
|
||||
|
||||
$r = q("UPDATE `user` SET `pwdreset` = '%s' WHERE `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `user` SET `pwdreset` = '%s' WHERE `uid` = %d",
|
||||
dbesc($new_password_encoded),
|
||||
intval($uid)
|
||||
);
|
||||
|
@ -74,7 +74,7 @@ function lostpass_content(&$a) {
|
|||
$new_password = autoname(6) . mt_rand(100,9999);
|
||||
$new_password_encoded = hash('whirlpool',$new_password);
|
||||
|
||||
$r = q("UPDATE `user` SET `password` = '%s', `pwdreset` = '' WHERE `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `user` SET `password` = '%s', `pwdreset` = '' WHERE `uid` = %d",
|
||||
dbesc($new_password_encoded),
|
||||
intval($uid)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue