mirror of
https://github.com/grocy/grocy.git
synced 2025-10-15 01:37:13 +00:00
Upgraded to PHP-CS-Fixer v3
This commit is contained in:
@@ -7,18 +7,18 @@ $db = $this->getDatabaseService()->GetDbConnection();
|
||||
if (defined('GROCY_HTTP_USER'))
|
||||
{
|
||||
// Migrate old user defined in config file to database
|
||||
$newUserRow = $db->users()->createRow(array(
|
||||
$newUserRow = $db->users()->createRow([
|
||||
'username' => GROCY_HTTP_USER,
|
||||
'password' => password_hash(GROCY_HTTP_PASSWORD, PASSWORD_DEFAULT)
|
||||
));
|
||||
]);
|
||||
$newUserRow->save();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create default user "admin" with password "admin"
|
||||
$newUserRow = $db->users()->createRow(array(
|
||||
$newUserRow = $db->users()->createRow([
|
||||
'username' => 'admin',
|
||||
'password' => password_hash('admin', PASSWORD_DEFAULT)
|
||||
));
|
||||
]);
|
||||
$newUserRow->save();
|
||||
}
|
||||
|
Reference in New Issue
Block a user