Fix Forum\UpdateUsername
This commit is contained in:
parent
7b31231c4a
commit
548b43802a
1 changed files with 6 additions and 0 deletions
|
@ -31,13 +31,19 @@ class UpdateUsername extends Action
|
|||
$this->c->DB->exec($query, $vars);
|
||||
|
||||
$forums = $this->c->ForumManager->init($this->c->groups->get($this->c->GROUP_ADMIN))->get(0)->descendants;
|
||||
$isMod = false;
|
||||
|
||||
foreach ($forums as $forum) {
|
||||
if ($user->isModerator($forum)) {
|
||||
$isMod = true;
|
||||
$forum->modAdd($user); // переименование модератора
|
||||
|
||||
$this->c->forums->update($forum);
|
||||
}
|
||||
}
|
||||
|
||||
if ($isMod) {
|
||||
$this->manager->reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue