diff --git a/RestControllers/GroupsController.php b/RestControllers/GroupsController.php index 6696510..0300f49 100644 --- a/RestControllers/GroupsController.php +++ b/RestControllers/GroupsController.php @@ -14,6 +14,7 @@ class GroupsController { GroupInfo::ADMINISTRATOR => "administrator", GroupInfo::MODERATOR => "moderator", GroupInfo::MEMBER => "member", + GroupInfo::INVITED => "invited", GroupInfo::PENDING => "pending", GroupInfo::VISITOR => "visitor" ); diff --git a/classes/components/GroupsComponent.php b/classes/components/GroupsComponent.php index 5af595f..396f5aa 100644 --- a/classes/components/GroupsComponent.php +++ b/classes/components/GroupsComponent.php @@ -307,8 +307,9 @@ class GroupsComponent { if($group_visibility_level == GroupInfo::OPEN_GROUP) return GroupInfo::VIEW_ACCESS; - //Else, all pending membership gives limited access - if($membership_level == GroupInfo::PENDING) + //Else, all pending and invited membership get limited access + if($membership_level == GroupInfo::PENDING || + $membership_level == GroupInfo::INVITED) return GroupInfo::LIMITED_ACCESS; //Private groups gives limited access diff --git a/classes/models/GroupInfo.php b/classes/models/GroupInfo.php index 02d9edd..5b9a1d0 100644 --- a/classes/models/GroupInfo.php +++ b/classes/models/GroupInfo.php @@ -34,8 +34,9 @@ class GroupInfo extends BaseUniqueObject { const ADMINISTRATOR = 0; const MODERATOR = 1; const MEMBER = 2; - const PENDING = 3; - const VISITOR = 4; + const INVITED = 3; + const PENDING = 4; + const VISITOR = 5; //Get and set the name of group public function set_name(string $name){