Skip to content

Commit

Permalink
Merge pull request #124 from alex-bukach/7.x-2.x
Browse files Browse the repository at this point in the history
Fixed #120: New member state is pending, should be active when added by admin
  • Loading branch information
amitaibu committed Jan 28, 2017
2 parents 2ab92b1 + f9ab0c1 commit 4edaed4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function OgMembershipCrud($entity_type, $entity, $field, $instance, $lang
$gid = $item['target_id'];

// Must provide correct state in the event that approval is required.
if (empty($item['state']) && $entity_type == 'user' && !og_user_access($group_type, $gid, 'subscribe without approval', $entity)) {
if (empty($item['state']) && $entity_type == 'user' && !og_user_access($group_type, $gid, 'subscribe without approval', $entity) && !og_user_access($group_type, $gid, 'administer group')) {
$item['state'] = OG_STATE_PENDING;
}
elseif (empty($item['state']) || !in_array($gid, $diff['insert'])) {
Expand Down

0 comments on commit 4edaed4

Please sign in to comment.