forked from GNUsocial/gnu-social
RegisterThrottlePlugin tweak for silencing checks: make sure we don't crash during registration if another profile registered from this address has been since deleted.
Followup to commit 1caa08429f
This commit is contained in:
parent
1caa08429f
commit
6841a8d093
@ -157,7 +157,7 @@ class RegisterThrottlePlugin extends Plugin
|
||||
$ids = Registration_ip::usersByIP($ipaddress);
|
||||
foreach ($ids as $id) {
|
||||
$profile = Profile::staticGet('id', $id);
|
||||
if ($profile->isSilenced()) {
|
||||
if ($profile && $profile->isSilenced()) {
|
||||
throw new Exception(_("A banned user has registered from this address."));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user