fix attempt to insert user with null pwd_hash when auto creating (fixes #412)
This commit is contained in:
parent
4046fc59d8
commit
b840a74a1d
|
@ -701,9 +701,11 @@
|
||||||
|
|
||||||
// First login ?
|
// First login ?
|
||||||
if (db_num_rows($result) == 0) {
|
if (db_num_rows($result) == 0) {
|
||||||
|
$pwd_hash = encrypt_password(make_password(), $login);
|
||||||
|
|
||||||
$query2 = "INSERT INTO ttrss_users
|
$query2 = "INSERT INTO ttrss_users
|
||||||
(login,access_level,last_login,created)
|
(login,access_level,last_login,created,pwd_hash)
|
||||||
VALUES ('$login', 0, null, NOW())";
|
VALUES ('$login', 0, null, NOW(), '$pwd_hash')";
|
||||||
db_query($link, $query2);
|
db_query($link, $query2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue