Allow notes to be empty

This commit is contained in:
DariusIII
2023-06-27 22:55:45 +02:00
parent 7e71e9826d
commit bbc8f905c5
+10 -6
View File
@@ -578,13 +578,17 @@ class User extends Authenticatable
}
/**
* Add a new user.
*
* @return bool|int
*
* @throws \Exception
* @param string $userName
* @param string $password
* @param string $email
* @param int $role
* @param string|null $notes
* @param string $host
* @param int $invites
* @param int $invitedBy
* @return false|int|mixed
*/
public static function add(string $userName, string $password, string $email, int $role, string $notes = '', string $host = '', int $invites = Invitation::DEFAULT_INVITES, int $invitedBy = 0)
public static function add(string $userName, string $password, string $email, int $role, string|null $notes = '', string $host = '', int $invites = Invitation::DEFAULT_INVITES, int $invitedBy = 0)
{
$password = self::hashPassword($password);
if (! $password) {