File tree 1 file changed +12
-5
lines changed 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1466,12 +1466,16 @@ public function canLeave($group) {
1466
1466
*
1467
1467
*/
1468
1468
public function canManageMembers ($ group ) {
1469
- if ((int )$ group ->Archived === 1 ) {
1469
+ if (Gdn::session ()->UserID == $ group ->OwnerID ) {
1470
+ return true ;
1471
+ }
1472
+
1473
+ if ((int )$ group ->Archived == 1 ) {
1470
1474
return false ;
1471
1475
}
1476
+
1472
1477
$ groupRole = self ::getGroupRoleFor (Gdn::session ()->UserID , $ group ->GroupID );
1473
- if ($ groupRole == GroupModel::ROLE_LEADER ||
1474
- Gdn::session ()->UserID == $ group ->OwnerID ) {
1478
+ if ($ groupRole == GroupModel::ROLE_LEADER ) {
1475
1479
return true ;
1476
1480
}
1477
1481
return false ;
@@ -1486,12 +1490,15 @@ public function canInviteNewMember($group) {
1486
1490
$ group = $ this ->getByGroupID ($ group );
1487
1491
}
1488
1492
1489
- if ((int )$ group ->Archived === 1 ) {
1493
+ if (Gdn::session ()->UserID == $ group ->OwnerID ) {
1494
+ return true ;
1495
+ }
1496
+
1497
+ if ((int )$ group ->Archived == 1 ) {
1490
1498
return false ;
1491
1499
}
1492
1500
$ groupRole = self ::getGroupRoleFor (Gdn::session ()->UserID , $ group ->GroupID );
1493
1501
if ($ groupRole === GroupModel::ROLE_LEADER ||
1494
- Gdn::session ()->UserID === $ group ->OwnerID ||
1495
1502
Gdn::session ()->checkPermission (GroupsPlugin::GROUPS_EMAIL_INVITATIONS_PERMISSION )) {
1496
1503
return true ;
1497
1504
}
You can’t perform that action at this time.
0 commit comments