Groups: Hotfix for "Managers" tab

This commit is contained in:
veselcraft 2021-11-20 13:53:54 +03:00
parent e5238ecc41
commit b2a993d649
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -472,8 +472,8 @@ class User extends RowModel
$sel = $this->getRecord()->related("subscriptions.follower");
foreach($sel->where("model", "openvk\\Web\\Models\\Entities\\Club") as $target) {
$target = (new Clubs)->get($target->target);
if($admin && !$target->canBeModifiedBy($this)) continue;
if(!$target) continue;
if($admin && !$target->canBeModifiedBy($this)) continue;
$result[] = $target;
}