Code Duplication    Length = 7-7 lines in 2 locations

engine/classes/Elgg/Database/AccessCollections.php 2 locations

@@ 144-150 (lines=7) @@
141
					. " WHERE am.user_guid = $user_guid AND (ag.site_guid = $site_guid OR ag.site_guid = 0)";
142
	
143
				$collections = $db->getData($query);
144
				if ($collections) {
145
					foreach ($collections as $collection) {
146
						if (!empty($collection->access_collection_id)) {
147
							$access_array[] = (int)$collection->access_collection_id;
148
						}
149
					}
150
				}
151
	
152
				// Get ACLs owned.
153
				$query = "SELECT ag.id FROM {$prefix}access_collections ag ";
@@ 157-163 (lines=7) @@
154
				$query .= "WHERE ag.owner_guid = $user_guid AND (ag.site_guid = $site_guid OR ag.site_guid = 0)";
155
	
156
				$collections = $db->getData($query);
157
				if ($collections) {
158
					foreach ($collections as $collection) {
159
						if (!empty($collection->id)) {
160
							$access_array[] = (int)$collection->id;
161
						}
162
					}
163
				}
164
	
165
				$ignore_access = elgg_check_access_overrides($user_guid);
166