Allow role to be null

This commit is contained in:
DariusIII
2023-04-05 19:25:45 +02:00
parent 180620312d
commit ad64247945
+2 -2
View File
@@ -246,11 +246,11 @@ class User extends Authenticatable
self::find($id)->delete();
}
public static function getCount(string $role = '', string $username = '', string $host = '', string $email = ''): int
public static function getCount($role = null, string $username = '', string $host = '', string $email = ''): int
{
$res = self::query()->where('email', '<>', 'sharing@nZEDb.com');
if ($role !== '') {
if (! empty($role)) {
$res->where('roles_id', $role);
}