summaryrefslogtreecommitdiff
path: root/includes/sys_auth.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2013-12-26 13:34:48 +0100
committerPhilip Häusler <msquare@notrademark.de>2013-12-26 13:34:48 +0100
commit0c98f13eee10a61cabdc13e7aa75916d50b8b078 (patch)
treed3931a0b5ffb03e59c3589de5dcfa3910e10bca6 /includes/sys_auth.php
parent3cc147d235bc977aedb660d896cbb54d1a4f92ec (diff)
user password recovery
Diffstat (limited to 'includes/sys_auth.php')
-rw-r--r--includes/sys_auth.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/sys_auth.php b/includes/sys_auth.php
index 3902aea2..e9fa197d 100644
--- a/includes/sys_auth.php
+++ b/includes/sys_auth.php
@@ -30,7 +30,7 @@ function generate_salt($length = 16) {
// set the password of a user
function set_password($uid, $password) {
- return sql_query("UPDATE `User` SET `Passwort` = '" . sql_escape(crypt($password, CRYPT_ALG . '$' . generate_salt(16) . '$')) . "' WHERE `UID` = " . intval($uid) . " LIMIT 1");
+ return sql_query("UPDATE `User` SET `Passwort` = '" . sql_escape(crypt($password, CRYPT_ALG . '$' . generate_salt(16) . '$')) . "', `password_recovery_token`=NULL WHERE `UID` = " . intval($uid) . " LIMIT 1");
}
// verify a password given a precomputed salt.