Completed
Pull Request — master (#168)
by Matt
32s
created
conditions/type/base.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -258,8 +258,7 @@
 block discarded – undo
258 258
 			if ($group_rule['autogroups_group_id'] == $current_rule['autogroups_group_id'] &&
259 259
 				$group_rule['autogroups_type_id'] != $current_rule['autogroups_type_id'] &&
260 260
 				count($user_id_ary)
261
-			)
262
-			{
261
+			) {
263 262
 				// Load other auto group rule's condition type and get new data for our user(s)
264 263
 				$condition = $this->container->get($group_rule['autogroups_type_name']);
265 264
 				$condition_user_data = $condition->get_users_for_condition(array(
Please login to merge, or discard this patch.
controller/admin_controller.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,11 +296,14 @@
 block discarded – undo
296 296
 		// Format autogroups_excluded_groups for storage in the db
297 297
 		$data['autogroups_excluded_groups'] = !empty($data['autogroups_excluded_groups']) ? json_encode($data['autogroups_excluded_groups']) : '';
298 298
 
299
-		if ($autogroups_id != 0) // Update existing auto group data
299
+		if ($autogroups_id != 0)
300
+		{
301
+			// Update existing auto group data
300 302
 		{
301 303
 			$sql = 'UPDATE ' . $this->autogroups_rules_table . '
302 304
 				SET ' . $this->db->sql_build_array('UPDATE', $data) . '
303 305
 				WHERE autogroups_id = ' . (int) $autogroups_id;
306
+		}
304 307
 			$this->db->sql_query($sql);
305 308
 		}
306 309
 		else // Insert new auto group data
Please login to merge, or discard this patch.
event/listener.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -171,15 +171,21 @@
 block discarded – undo
171 171
 	 */
172 172
 	public function membership_check($event)
173 173
 	{
174
-		if ($event->offsetExists('session_data')) // core.session_create_after
174
+		if ($event->offsetExists('session_data'))
175
+		{
176
+			// core.session_create_after
175 177
 		{
176 178
 			// ignore logouts or registration (registration was checked already during user_add_after)
177 179
 			$users = !preg_match('/logout|register/', $event['session_data']['session_page']) ? $event['session_data']['session_user_id'] : null;
178 180
 		}
179
-		else if ($event->offsetExists('user_id_ary')) // core.user_add_after
181
+		}
182
+		else if ($event->offsetExists('user_id_ary'))
183
+		{
184
+			// core.user_add_after
180 185
 		{
181 186
 			$users = $event['user_id_ary'];
182 187
 		}
188
+		}
183 189
 		else // core.user_active_flip_after
184 190
 		{
185 191
 			$users = $event['user_id'];
Please login to merge, or discard this patch.