mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Hotfix for old user to database migration (this will be included in the v1.16.0 release)
This commit is contained in:
parent
6f47a5415c
commit
aaa270a52f
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
$db = $this->DatabaseService->GetDbConnection();
|
$db = $this->DatabaseService->GetDbConnection();
|
||||||
|
|
||||||
if (defined('HTTP_USER'))
|
if (defined('GROCY_HTTP_USER'))
|
||||||
{
|
{
|
||||||
// Migrate old user defined in config file to database
|
// Migrate old user defined in config file to database
|
||||||
$newUserRow = $db->users()->createRow(array(
|
$newUserRow = $db->users()->createRow(array(
|
||||||
'username' => HTTP_USER,
|
'username' => GROCY_HTTP_USER,
|
||||||
'password' => password_hash(HTTP_PASSWORD, PASSWORD_DEFAULT)
|
'password' => password_hash(GROCY_HTTP_PASSWORD, PASSWORD_DEFAULT)
|
||||||
));
|
));
|
||||||
$newUserRow->save();
|
$newUserRow->save();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user