Skip to content

Commit

Permalink
Enable groups_user_is_member() function with reference to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
JoryHogeveen committed May 9, 2017
1 parent 99347b8 commit 428fbf3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/class-groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public function modify_user( $user, $accessible ) {
/**
* Filter the user-group relation.
*
* @todo https://github.com/itthinx/groups/pull/59
* @see Groups_User_Group::read() >> groups/lib/core/class-groups-user-group.php
*
* @since 1.7.x
Expand All @@ -237,15 +238,15 @@ public function modify_user( $user, $accessible ) {
* @param int $group_id Group ID.
* @return bool|object
*/
/*public function groups_user_is_member( $result, $user_id, $group_id ) {
public function groups_user_is_member( $result, $user_id, $group_id ) {
if ( (int) $user_id === (int) $this->store->get_curUser()->ID
&& $this->selectedGroup
&& (int) $group_id === (int) $this->selectedGroup->group->group_id
) {
$result = $this->selectedGroup->group;
}
return $result;
}*/
}

/**
* Filter for the current view.
Expand Down

0 comments on commit 428fbf3

Please sign in to comment.