type==GROUP_COLLECTION_TYPE) { $access = $group->access_type; if( $group->access_type == $group->ACCESS_PRIVATE ) { if ($_SESSION['user']['id']) {//if private group if (GROUP::member_exists($gid,$_SESSION['user']['id'])) { $skip_group_modules = FALSE; } else {// haha no way for non member of group $skip_group_modules = TRUE; } } else {//haha no way for anonymous user $skip_group_modules = TRUE; } $access_type = 'Private'; } else { $access_type = 'Public'; } if( $group->reg_type == $group->REG_OPEN ) { $access_type.= ' Open'; } else { $access_type.= ' Moderated'; } if (Group::is_admin((int)$gid, (int)$_SESSION['user']['id'])){ $is_admin = TRUE; } $members = $group->get_members($cnt=FALSE, 5, 1, 'created', 'DESC',FALSE); //$members = $group->get_members(); $group_details = array(); $group_details['collection_id'] = $group->collection_id; $group_details['type'] = $group->type; $group_details['author_id'] = $group->author_id; $user = new User(); $user->load((int)$group->author_id); $first_name = $user->first_name; $last_name = $user->last_name; $group_details['author_name'] = $first_name.' '.$last_name; $group_details['author_picture'] = $user->picture; $group_details['title'] = $group->title; $group_details['description'] = $group->description; $group_details['is_active'] = $group->is_active; $group_details['picture'] = $group->picture; $group_details['desktop_picture'] = $group->desktop_picture; $group_details['created'] = date("F d, Y h:i A", $group->created); $group_details['changed'] = $group->changed; $group_details['category_id'] = $group->category_id; $cat_obj = new Category(); $cat_obj->set_category_id($group->category_id); $cat_obj->load(); $cat_name = stripslashes($cat_obj->name); $cat_description = stripslashes($cat_obj->description); $group_details['category_name'] = $cat_name; $group_details['category_description'] = $cat_description; $group_details['members'] = Group::get_member_count($gid); $group_details['access_type'] = $access_type; $group_details['is_admin'] = $is_admin; //////////////////get details of group EOF if(is_array($members)){ $count = count($members); foreach ($members as $member) { $count_relations = Relation::get_relations($member['user_id']); $user = new User(); $user->load((int)$member['user_id']); $login_name = $user->login_name; $user_picture = $user->picture; $users_data[] = array('user_id'=>$member['user_id'],'picture'=>$user_picture,'login_name'=>$login_name,'no_of_relations'=>count($count_relations)); } $final_array = array('users_data'=>$users_data, 'total_users'=>$count); } $users = $final_array; if (Group::member_exists((int)$group->collection_id, (int)$_SESSION['user']['id'])) { $is_member = TRUE; } $group_details['is_member'] = $is_member; //..get details of group ends } ?>