🆙 Add more fixes 🆙

This commit is contained in:
Remco
2026-02-02 20:56:28 +01:00
parent 0ca57c9a91
commit e6ed904f14
19 changed files with 1927 additions and 2302 deletions
@@ -25,7 +25,7 @@ class CreateNewUser implements CreatesNewUsers
/**
* Validate and create a newly registered user.
*/
public function create(array $input)
public function create(array $input): User
{
if ((setting('disable_registration') ?: '0') == '1') {
throw ValidationException::withMessages([
@@ -45,7 +45,7 @@ class CreateNewUser implements CreatesNewUsers
->orWhere('ip_register', '=', $ip)
->count();
if ($matchingIpCount >= (int) (setting('max_accounts_per_ip') ?: 99)) {
if ($matchingIpCount >= (int) (setting('max_accounts_per_ip') ?: '99')) {
throw ValidationException::withMessages([
'registration' => __('You have reached the max amount of allowed account'),
]);
@@ -65,7 +65,7 @@ class CreateNewUser implements CreatesNewUsers
'ip_register' => $ip,
'ip_current' => $ip,
'auth_ticket' => '',
'home_room' => (int) (setting('hotel_home_room') ?: 0),
'home_room' => (int) (setting('hotel_home_room') ?: '0'),
]);
$user->update([