Don't enforce first/last name when creating users (closes #1888)

This commit is contained in:
Bernd Bestel 2022-05-14 16:59:11 +02:00
parent 9c1fd176c0
commit a5e3442602
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -4,7 +4,7 @@ namespace Grocy\Services;
class UsersService extends BaseService class UsersService extends BaseService
{ {
public function CreateUser(string $username, string $firstName, string $lastName, string $password, string $pictureFileName = null) public function CreateUser(string $username, ?string $firstName, ?string $lastName, string $password, string $pictureFileName = null)
{ {
$newUserRow = $this->getDatabase()->users()->createRow([ $newUserRow = $this->getDatabase()->users()->createRow([
'username' => $username, 'username' => $username,