diff options
author | Andrew Dolgov <[email protected]> | 2011-12-30 22:49:41 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-12-30 22:49:41 +0400 |
commit | b840a74a1db4c87afd96da4df9d3f4d92f1459f3 (patch) | |
tree | acf92bc067663335fe2e400413502e538c49fa6c /include/functions.php | |
parent | 4046fc59d80c87496c598a71ad7419a93b2bbb0c (diff) |
fix attempt to insert user with null pwd_hash when auto creating (fixes #412)
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index 3e926b1a3..fa16bf8bf 100644 --- a/include/functions.php +++ b/include/functions.php @@ -701,9 +701,11 @@ // First login ? if (db_num_rows($result) == 0) { + $pwd_hash = encrypt_password(make_password(), $login); + $query2 = "INSERT INTO ttrss_users - (login,access_level,last_login,created) - VALUES ('$login', 0, null, NOW())"; + (login,access_level,last_login,created,pwd_hash) + VALUES ('$login', 0, null, NOW(), '$pwd_hash')"; db_query($link, $query2); } } |