mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 19:37:12 +00:00
Applied EditorConfig settings to all files
This commit is contained in:
@@ -12,17 +12,17 @@ class UsersService extends BaseService
|
||||
'last_name' => $lastName,
|
||||
'password' => password_hash($password, PASSWORD_DEFAULT)
|
||||
));
|
||||
$newUserRow = $newUserRow->save();
|
||||
$permList = array();
|
||||
foreach ($this->getDatabase()->permission_hierarchy()->where('name', GROCY_DEFAULT_PERMISSIONS)->fetchAll() as $perm) {
|
||||
$permList[] = array(
|
||||
'user_id' => $newUserRow->id,
|
||||
'permission_id' => $perm->id
|
||||
);
|
||||
}
|
||||
$this->getDatabase()->user_permissions()->insert($permList);
|
||||
$newUserRow = $newUserRow->save();
|
||||
$permList = array();
|
||||
foreach ($this->getDatabase()->permission_hierarchy()->where('name', GROCY_DEFAULT_PERMISSIONS)->fetchAll() as $perm) {
|
||||
$permList[] = array(
|
||||
'user_id' => $newUserRow->id,
|
||||
'permission_id' => $perm->id
|
||||
);
|
||||
}
|
||||
$this->getDatabase()->user_permissions()->insert($permList);
|
||||
|
||||
return $newUserRow;
|
||||
return $newUserRow;
|
||||
}
|
||||
|
||||
public function EditUser(int $userId, string $username, string $firstName, string $lastName, string $password)
|
||||
|
Reference in New Issue
Block a user