Hotfix for old user to database migration (this will be included in the v1.16.0 release)

This commit is contained in:
Bernd Bestel 2018-07-25 20:20:09 +02:00
parent 6f47a5415c
commit aaa270a52f
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -4,12 +4,12 @@
$db = $this->DatabaseService->GetDbConnection();
if (defined('HTTP_USER'))
if (defined('GROCY_HTTP_USER'))
{
// Migrate old user defined in config file to database
$newUserRow = $db->users()->createRow(array(
'username' => HTTP_USER,
'password' => password_hash(HTTP_PASSWORD, PASSWORD_DEFAULT)
'username' => GROCY_HTTP_USER,
'password' => password_hash(GROCY_HTTP_PASSWORD, PASSWORD_DEFAULT)
));
$newUserRow->save();
}