Code Duplication    Length = 5-5 lines in 2 locations

mod/gc_mobile_api/models/group.php 2 locations

@@ 270-274 (lines=5) @@
267
	$groupObj = get_entity($group->guid);
268
	$group->public = $groupObj->isPublicMembership();
269
	$group->member = $groupObj->isMember($user_entity);
270
	if (!$group->public && !$group->member){
271
		$group->access = false;
272
	} else {
273
		$group->access = true;
274
	}
275
	//Group 'Tools' that are enabled or not
276
	//Returning info hide anything not activitated
277
	$group->enabled = new stdClass();
@@ 379-383 (lines=5) @@
376
		$groupObj = get_entity($group->guid);
377
		$group->member = $groupObj->isMember($user_entity);
378
		$group->public = $groupObj->isPublicMembership();
379
		if (!$group->public && !$group->member){
380
			$group->access = false;
381
		} else {
382
			$group->access = true;
383
		}
384
		$group->owner = ($groupObj->getOwnerEntity() == $user_entity);
385
		$group->iconURL = $groupObj->geticon();
386
		$group->count = $groupObj->getMembers(array('count' => true));