Prevent changing username for banned
This commit is contained in:
parent
68b12a6241
commit
930aa6ef88
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue