No problem, I’ve seen you have already created an issue on GitHub. But there hasn’t been any activity in the repo for a very long time. Quick fix:
<?php
class UsersField extends CheckboxesField {
public function options() {
foreach(kirby()->site()->users() as $user) {
if (isset($this->exclude['roles']) && is_array($this->exclude['roles']) && in_array($user->role(), $this->exclude['roles'])) continue;
if (isset($this->exclude['users']) && is_array($this->exclude['users']) && in_array($user->username(), $this->exclude['users'])) continue;
$options[$user->username()] = $user;
}
return $options;
}
}