fix attempt to insert user with null pwd_hash when auto creating (fixes #412)

This commit is contained in:
Andrew Dolgov 2011-12-30 22:49:41 +04:00
parent 4046fc59d8
commit b840a74a1d
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}