src/mako/gatekeeper/entities/group/Group.php
public function isMember(User $user)
	{
		if(!$this->isPersisted)
		{
			throw new LogicException('You can only check if a user is a member of a group that exist in the database.');
		}

		if(!$user->isPersisted())
		{
			throw new LogicException('You can only check if a user that exist in the database is a member of a group.');
		}

		return $this->users()->where($user->getPrimaryKey(), '=', $user->getPrimaryKeyValue())->count() > 0;
	}
public function isMember(User $user)
	{
		if(!$this->isPersisted)
		{
			throw new LogicException('You can only check if a user is a member of a group that exist in the database.');
		}

		if(!$user->isPersisted())
		{
			throw new LogicException('You can only check if a user that exist in the database is a member of a group.');
		}

		return $this->users()->where($user->getPrimaryKey(), '=', $user->getPrimaryKeyValue())->count() > 0;
	}
public function isMember ( User $ user ) { if ( ! $ this -> isPersisted ) { throw new LogicException ( 'You can only check if a user is a member of a group that exist in the database.' ) ; } if ( ! $ user -> isPersisted ( ) ) { throw new LogicException ( 'You can only check if a user that exist in the database is a member of a group.' ) ; } return $ this -> users ( ) -> where ( $ user -> getPrimaryKey ( ) , '=' , $ user -> getPrimaryKeyValue ( ) ) -> count ( ) > 0 ; }
Returns TRUE if a user is a member of the group and FALSE if not.

@param  \mako\gatekeeper\entities\user\User $user User
@throws \LogicException
@return bool
Returns TRUE if a user is a member of the group and FALSE if not .