X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fgroupmembers.php;h=a16debd7b068ecd4e69deec35d61e42475f83752;hb=95229bc7a060bb6289aa9b7950f4e69acd96a1e7;hp=5c59594c56b20bdad0f243cb5a816fb6b6e2a2c4;hpb=26b03240271d061177a258dbae46bc384dbc9d6a;p=quix0rs-gnu-social.git diff --git a/actions/groupmembers.php b/actions/groupmembers.php index 5c59594c56..a16debd7b0 100644 --- a/actions/groupmembers.php +++ b/actions/groupmembers.php @@ -73,14 +73,21 @@ class GroupmembersAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } - $this->group = User_group::staticGet('nickname', $nickname); + $local = Local_group::staticGet('nickname', $nickname); + + if (!$local) { + $this->clientError(_('No such group.'), 404); + return false; + } + + $this->group = User_group::staticGet('id', $local->group_id); if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } @@ -192,7 +199,9 @@ class GroupMemberListItem extends ProfileListItem { $user = common_current_user(); - if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group) && + if (!empty($user) && + $user->id != $this->profile->id && + ($user->isAdmin($this->group) || $user->hasRight(Right::MAKEGROUPADMIN)) && !$this->profile->isAdmin($this->group)) { $this->out->elementStart('li', 'entity_make_admin'); $maf = new MakeAdminForm($this->out, $this->profile, $this->group,