Prevent changing username for banned

This commit is contained in:
Visman 2020-11-02 22:31:50 +07:00
parent 68b12a6241
commit 930aa6ef88

View file

@ -35,7 +35,11 @@ class Profile extends Rules
protected function getrename(): bool
{
return $this->admin || ($this->moderator && '1' == $this->user->g_mod_rename_users);
return ! $this->curUser->isBanByName
&& (
$this->admin
|| ($this->moderator && '1' == $this->user->g_mod_rename_users)
);
}
protected function geteditPass(): bool