Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Fixed #120: New member state is pending, should be active when added by admin #124

Merged
merged 1 commit into from
Jan 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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