$ids = Registration_ip::usersByIP($ipaddress);
foreach ($ids as $id) {
$profile = Profile::staticGet('id', $id);
- if ($profile->isSilenced()) {
- throw new Exception(_("A banned user has registered from this address."));
+ if ($profile && $profile->isSilenced()) {
+ throw new Exception(_m("A banned user has registered from this address."));
}
}
}