Completed
Push — master ( c82647...f02916 )
by Paul
03:02
created
event/listener.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,8 +162,7 @@
 block discarded – undo
162 162
 					// We simply return and continue the login procedure (The normal way :)),
163 163
 					// and will disable all pages untill he has added a 2FA key.
164 164
 					return;
165
-				}
166
-				else
165
+				} else
167 166
 				{
168 167
 					$redirect = $this->request->variable('redirect', "{$this->root_path}index.{$this->php_ext}");
169 168
 					if ($event['admin'])
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function __construct(session_helper_interface $helper, helper $controller_helper, user $user, request_interface $request, driver_interface $db, config $config, $php_ext, $root_path)
78 78
 	{
79
-		$this->helper				= $helper;
80
-		$this->controller_helper 	= $controller_helper;
81
-		$this->user					= $user;
79
+		$this->helper = $helper;
80
+		$this->controller_helper = $controller_helper;
81
+		$this->user = $user;
82 82
 		$this->request				= $request;
83
-		$this->config				= $config;
84
-		$this->db					= $db;
83
+		$this->config = $config;
84
+		$this->db = $db;
85 85
 		$this->php_ext				= $php_ext;
86
-		$this->root_path			= $root_path;
86
+		$this->root_path = $root_path;
87 87
 	}
88 88
 
89 89
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		}
118 118
 		if ($this->user->data['is_bot'] == false && $this->user->data['user_id'] != ANONYMOUS)
119 119
 		{
120
-			$sql = 'SELECT module_id FROM ' . MODULES_TABLE . ' WHERE module_langname = \'UCP_TFA\' OR module_langname = \'UCP_TFA_MANAGE\'';
120
+			$sql = 'SELECT module_id FROM '.MODULES_TABLE.' WHERE module_langname = \'UCP_TFA\' OR module_langname = \'UCP_TFA_MANAGE\'';
121 121
 			$result = $this->db->sql_query($sql);
122 122
 			$allowed_i = array();
123 123
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 			$ucp_mode = "-paul999-tfa-ucp-tfa_module";
130 130
 			$allowed_i[] = $ucp_mode;
131 131
 
132
-			if ($this->user->page['page_name'] == 'ucp.' . $this->php_ext && in_array($this->request->variable('i', ''), $allowed_i))
132
+			if ($this->user->page['page_name'] == 'ucp.'.$this->php_ext && in_array($this->request->variable('i', ''), $allowed_i))
133 133
 			{
134 134
 				return; // We are at our UCP page, so skip any other checks. This page is always available
135 135
 			}
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			{
138 138
 				$this->user->add_lang_ext('paul999/tfa', 'common');
139 139
 				$url = append_sid("{$this->root_path}ucp.{$this->php_ext}", "i={$ucp_mode}");
140
-				trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="' . $url . '">', '</a>'), E_USER_WARNING);
140
+				trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="'.$url.'">', '</a>'), E_USER_WARNING);
141 141
 			}
142 142
 		}
143 143
 	}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 						'admin'			=> (int) $event['admin'],
176 176
 						'auto_login'	=> (int) $event['auto_login'],
177 177
 						'viewonline'	=> (int) !$this->request->is_set_post('viewonline'),
178
-						)) . '?redirect=' . $redirect
178
+						)).'?redirect='.$redirect
179 179
 					);
180 180
 				}
181 181
 			}
Please login to merge, or discard this patch.
controller/main_controller.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,8 +127,7 @@
 block discarded – undo
127 127
 		if (!empty($default))
128 128
 		{
129 129
 			$module = $this->session_helper->findModule($class);
130
-		}
131
-		else
130
+		} else
132 131
 		{
133 132
 			foreach ($modules as $row)
134 133
 			{
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function __construct(helper $controller_helper, driver_interface $db, template $template, user $user, request_interface $request, config $config, session_helper_interface $session_helper, $root_path, $php_ext)
89 89
 	{
90
-		$this->controller_helper 	= $controller_helper;
91
-		$this->template 			= $template;
92
-		$this->db					= $db;
93
-		$this->user					= $user;
94
-		$this->request				= $request;
95
-		$this->config				= $config;
96
-		$this->session_helper		= $session_helper;
97
-		$this->root_path			= $root_path;
98
-		$this->php_ext				= $php_ext;
90
+		$this->controller_helper = $controller_helper;
91
+		$this->template = $template;
92
+		$this->db = $db;
93
+		$this->user = $user;
94
+		$this->request = $request;
95
+		$this->config = $config;
96
+		$this->session_helper = $session_helper;
97
+		$this->root_path = $root_path;
98
+		$this->php_ext = $php_ext;
99 99
 
100 100
 	}
101 101
 
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 			if ($admin)
226 226
 			{
227 227
 				// the login array is used because the user ids do not differ for re-authentication
228
-				$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
229
-						WHERE session_id = '" . $this->db->sql_escape($old_session_id) . "'
228
+				$sql = 'DELETE FROM '.SESSIONS_TABLE."
229
+						WHERE session_id = '" . $this->db->sql_escape($old_session_id)."'
230 230
 						AND session_user_id = " . (int) $user_id;
231 231
 				$this->db->sql_query($sql);
232 232
 
Please login to merge, or discard this patch.
ucp/tfa_module.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -101,13 +101,11 @@  discard block
 block discarded – undo
101 101
 				meta_refresh(3, $this->u_action);
102 102
 				$message = $this->user->lang['TFA_KEY_ADDED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
103 103
 				trigger_error($message);
104
-			}
105
-			else
104
+			} else
106 105
 			{
107 106
 				$error[] = $this->user->lang('TFA_MODULE_NOT_FOUND', $class);
108 107
 			}
109
-		}
110
-		catch (\Exception $e)
108
+		} catch (\Exception $e)
111 109
 		{
112 110
 			$error[] = $e->getMessage();
113 111
 		}
@@ -130,8 +128,7 @@  discard block
 block discarded – undo
130 128
 			if (!check_form_key('ucp_tfa_keys'))
131 129
 			{
132 130
 				$error[] = 'FORM_INVALID';
133
-			}
134
-			else
131
+			} else
135 132
 			{
136 133
 				switch ($mode)
137 134
 				{
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 	 */
61 61
 	private function setup(user $user, template $template, request_interface $request, session_helper $session_helper)
62 62
 	{
63
-		$this->user 				= $user;
63
+		$this->user = $user;
64 64
 		$this->template 			= $template;
65 65
 		$this->request 				= $request;
66
-		$this->session_helper 		= $session_helper;
66
+		$this->session_helper = $session_helper;
67 67
 	}
68 68
 
69 69
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 				$module->register();
100 100
 
101 101
 				meta_refresh(3, $this->u_action);
102
-				$message = $this->user->lang['TFA_KEY_ADDED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
102
+				$message = $this->user->lang['TFA_KEY_ADDED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>');
103 103
 				trigger_error($message);
104 104
 			}
105 105
 			else
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				}
185 185
 			}
186 186
 			meta_refresh(3, $this->u_action);
187
-			$message = $this->user->lang['TFA_KEYS_DELETED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
187
+			$message = $this->user->lang['TFA_KEYS_DELETED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>');
188 188
 			trigger_error($message);
189 189
 		}
190 190
 	}
Please login to merge, or discard this patch.
acp/tfa_module.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 			'title'	=> 'ACP_TFA_SETTINGS',
44 44
 			'vars'	=> array(
45 45
 				'legend1'				=> 'ACP_TFA_SETTINGS',
46
-				'tfa_mode'				=> array('lang' => 'TFA_MODE',			'validate' => 'bool',	'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true),
46
+				'tfa_mode'				=> array('lang' => 'TFA_MODE', 'validate' => 'bool', 'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true),
47 47
 
48 48
 				'legend4'				=> 'ACP_SUBMIT_CHANGES',
49 49
 			)
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 
98 98
 		if ($submit)
99 99
 		{
100
-			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_' . strtoupper($mode));
100
+			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_'.strtoupper($mode));
101 101
 
102 102
 			$message = $user->lang('CONFIG_UPDATED');
103 103
 			$message_type = E_USER_NOTICE;
104 104
 
105
-			trigger_error($message . adm_back_link($this->u_action), $message_type);
105
+			trigger_error($message.adm_back_link($this->u_action), $message_type);
106 106
 		}
107 107
 
108 108
 		if (!$request->is_secure())
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 		$template->assign_vars(array(
117 117
 			'L_TITLE'			=> $user->lang[$display_vars['title']],
118
-			'L_TITLE_EXPLAIN'	=> $user->lang[$display_vars['title'] . '_EXPLAIN'],
118
+			'L_TITLE_EXPLAIN'	=> $user->lang[$display_vars['title'].'_EXPLAIN'],
119 119
 
120 120
 			'S_ERROR'			=> (sizeof($error)) ? true : false,
121 121
 			'ERROR_MSG'			=> implode('<br />', $error),
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 			$type = explode(':', $vars['type']);
145 145
 
146 146
 			$l_explain = '';
147
-			if ($vars['explain'] && isset($user->lang[$vars['lang'] . '_EXPLAIN']))
147
+			if ($vars['explain'] && isset($user->lang[$vars['lang'].'_EXPLAIN']))
148 148
 			{
149
-				$l_explain =  $user->lang[$vars['lang'] . '_EXPLAIN'];
149
+				$l_explain = $user->lang[$vars['lang'].'_EXPLAIN'];
150 150
 			}
151 151
 
152 152
 			$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		foreach ($act_ary as $key => $data)
188 188
 		{
189 189
 			$selected = ($data == $selected_value) ? ' selected="selected"' : '';
190
-			$act_options .= '<option value="' . $data . '"' . $selected . '>' . $user->lang($key) . '</option>';
190
+			$act_options .= '<option value="'.$data.'"'.$selected.'>'.$user->lang($key).'</option>';
191 191
 		}
192 192
 		return $act_options;
193 193
 	}
Please login to merge, or discard this patch.
modules/u2f.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 		$this->request  = $request;
76 76
 		$this->template = $template;
77 77
 
78
-		$this->registration_table	= $registration_table;
78
+		$this->registration_table = $registration_table;
79 79
 
80
-		$this->u2f = new \paul999\u2f\U2F('https://' . $this->request->server('HTTP_HOST'));
80
+		$this->u2f = new \paul999\u2f\U2F('https://'.$this->request->server('HTTP_HOST'));
81 81
 	}
82 82
 
83 83
 	/**
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			return false;
111 111
 		}
112 112
 		$sql = 'SELECT COUNT(registration_id) as reg_id 
113
-					FROM ' . $this->registration_table . ' 
113
+					FROM ' . $this->registration_table.' 
114 114
 					WHERE 
115 115
 						user_id = ' . (int) $user_id;
116 116
 		$result = $this->db->sql_query($sql);
@@ -184,9 +184,9 @@  discard block
 block discarded – undo
184 184
 			'u2f_request'	=> $registrations
185 185
 		);
186 186
 
187
-		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
187
+		$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).'
188 188
 					WHERE
189
-						session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND
189
+						session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND
190 190
 						session_user_id = ' . (int) $this->user->data['user_id'];
191 191
 		$this->db->sql_query($sql);
192 192
 		$count = $this->db->sql_affectedrows();
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
 			{
198 198
 				// Reset sessions table. We had multiple sessions with same ID!!!
199 199
 				$sql_ary['u2f_request'] = '';
200
-				$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
200
+				$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).'
201 201
 					WHERE
202
-						session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND
202
+						session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND
203 203
 						session_user_id = ' . (int) $this->user->data['user_id'];
204 204
 				$this->db->sql_query($sql);
205 205
 			}
@@ -219,9 +219,9 @@  discard block
 block discarded – undo
219 219
 		try
220 220
 		{
221 221
 			$sql = 'SELECT u2f_request 
222
-						FROM ' . SESSIONS_TABLE . ' 
222
+						FROM ' . SESSIONS_TABLE.' 
223 223
 						WHERE
224
-							session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND
224
+							session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND
225 225
 							session_user_id = ' . (int) $this->user->data['user_id'];
226 226
 			$result = $this->db->sql_query($sql);
227 227
 			$row = $this->db->sql_fetchrow($result);
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 				'last_used' => time(),
252 252
 			);
253 253
 
254
-			$sql = 'UPDATE ' . $this->registration_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE registration_id = ' . (int) $reg->getId();
254
+			$sql = 'UPDATE '.$this->registration_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' WHERE registration_id = '.(int) $reg->getId();
255 255
 			$this->db->sql_query($sql);
256 256
 		}
257 257
 		catch (U2fError $error)
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 		}
261 261
 		catch (\InvalidArgumentException $invalid)
262 262
 		{
263
-			throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG') . '<br />' . $invalid->getMessage(), $invalid);
263
+			throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG').'<br />'.$invalid->getMessage(), $invalid);
264 264
 		}
265 265
 	}
266 266
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 				'last_used' => time(),
333 333
 			);
334 334
 
335
-			$sql = 'INSERT INTO ' . $this->registration_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
335
+			$sql = 'INSERT INTO '.$this->registration_table.' '.$this->db->sql_build_array('INSERT', $sql_ary);
336 336
 			$this->db->sql_query($sql);
337 337
 
338 338
 			$sql_ary = array(
@@ -354,8 +354,8 @@  discard block
 block discarded – undo
354 354
 	public function show_ucp()
355 355
 	{
356 356
 		$sql = 'SELECT *
357
-			FROM ' . $this->registration_table . '
358
-			WHERE user_id = ' . (int) $this->user->data['user_id'] . '
357
+			FROM ' . $this->registration_table.'
358
+			WHERE user_id = ' . (int) $this->user->data['user_id'].'
359 359
 			ORDER BY registration_id ASC';
360 360
 
361 361
 		$result = $this->db->sql_query($sql);
@@ -392,8 +392,8 @@  discard block
 block discarded – undo
392 392
 		if (isset($data['keys']))
393 393
 		{
394 394
 			$sql_where = $this->db->sql_in_set('registration_id', $data['keys']);
395
-			$sql = 'DELETE FROM ' . $this->registration_table . '
396
-												WHERE user_id = ' . (int) $this->user->data['user_id'] . '
395
+			$sql = 'DELETE FROM '.$this->registration_table.'
396
+												WHERE user_id = ' . (int) $this->user->data['user_id'].'
397 397
 												AND ' . $sql_where;
398 398
 
399 399
 			$this->db->sql_query($sql);
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 	 */
408 408
 	private function getRegistrations($user_id)
409 409
 	{
410
-		$sql = 'SELECT * FROM ' . $this->registration_table . ' WHERE user_id = ' . (int) $user_id;
410
+		$sql = 'SELECT * FROM '.$this->registration_table.' WHERE user_id = '.(int) $user_id;
411 411
 		$result = $this->db->sql_query($sql);
412 412
 		$rows = array();
413 413
 
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
 	 */
496 496
 	private function update_session($sql_ary)
497 497
 	{
498
-		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
498
+		$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).'
499 499
 							WHERE
500
-								session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND
500
+								session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND
501 501
 								session_user_id = ' . (int) $this->user->data['user_id'];
502 502
 		$this->db->sql_query($sql);
503 503
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -11 removed lines patch added patch discarded remove patch
@@ -147,8 +147,7 @@  discard block
 block discarded – undo
147 147
 		if (!empty($secure))
148 148
 		{
149 149
 			return 'on' == strtolower($secure) || '1' == $secure;
150
-		}
151
-		else if ('443' == $this->request->server('SERVER_PORT'))
150
+		} else if ('443' == $this->request->server('SERVER_PORT'))
152 151
 		{
153 152
 			return true;
154 153
 		}
@@ -236,10 +235,12 @@  discard block
 block discarded – undo
236 235
 
237 236
 			if (property_exists($response, 'errorCode'))
238 237
 			{
239
-				if ($response->errorCode == 4) // errorCode 4 means that this device wasn't registered
238
+				if ($response->errorCode == 4) {
239
+					// errorCode 4 means that this device wasn't registered
240 240
 				{
241 241
 					throw new AccessDeniedHttpException($this->user->lang('TFA_NOT_REGISTERED'));
242 242
 				}
243
+				}
243 244
 				throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG'));
244 245
 			}
245 246
 			$result = new AuthenticationResponse($response->signatureData, $response->clientData, $response->keyHandle, $response->errorCode);
@@ -253,12 +254,10 @@  discard block
 block discarded – undo
253 254
 
254 255
 			$sql = 'UPDATE ' . $this->registration_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE registration_id = ' . (int) $reg->getId();
255 256
 			$this->db->sql_query($sql);
256
-		}
257
-		catch (U2fError $error)
257
+		} catch (U2fError $error)
258 258
 		{
259 259
 			$this->createError($error);
260
-		}
261
-		catch (\InvalidArgumentException $invalid)
260
+		} catch (\InvalidArgumentException $invalid)
262 261
 		{
263 262
 			throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG') . '<br />' . $invalid->getMessage(), $invalid);
264 263
 		}
@@ -295,8 +294,7 @@  discard block
 block discarded – undo
295 294
 		if ($count == 0)
296 295
 		{
297 296
 			trigger_error('TFA_UNABLE_TO_UPDATE_SESSION');
298
-		}
299
-		else if ($count > 1)
297
+		} else if ($count > 1)
300 298
 		{
301 299
 			// Reset sessions table. We had multiple sessions with same ID!!!
302 300
 			$sql_ary['u2f_request'] = '';
@@ -340,8 +338,7 @@  discard block
 block discarded – undo
340 338
 			);
341 339
 
342 340
 			$this->update_session($sql_ary);
343
-		}
344
-		catch (U2fError $err)
341
+		} catch (U2fError $err)
345 342
 		{
346 343
 			$this->createError($err);
347 344
 		}
Please login to merge, or discard this patch.
migrations/set_role_data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 	protected function role_exists($role)
43 43
 	{
44 44
 		$sql = 'SELECT role_id
45
-		FROM ' . ACL_ROLES_TABLE . "
46
-		WHERE role_name = '" . $this->db->sql_escape($role) . "'";
45
+		FROM ' . ACL_ROLES_TABLE."
46
+		WHERE role_name = '" . $this->db->sql_escape($role)."'";
47 47
 		$result = $this->db->sql_query_limit($sql, 1);
48 48
 		$role_id = $this->db->sql_fetchfield('role_id');
49 49
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.
migrations/initial_schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	{
17 17
 		return array(
18 18
 			'add_tables'	=> array(
19
-				$this->table_prefix . 'tfa_registration'	=> array(
19
+				$this->table_prefix.'tfa_registration'	=> array(
20 20
 					'COLUMNS'	=> array(
21 21
 						'registration_id'		=> array('UINT', null, 'auto_increment'),
22 22
 						'user_id'				=> array('UINT', 0),
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	{
41 41
 		return array(
42 42
 			'drop_tables'	=> array(
43
-				$this->table_prefix . 'tfa_registration',
43
+				$this->table_prefix.'tfa_registration',
44 44
 			),
45 45
 		);
46 46
 	}
Please login to merge, or discard this patch.
migrations/update_sessions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	{
25 25
 		return array(
26 26
 			'add_columns'        => array(
27
-				$this->table_prefix . 'sessions'        => array(
27
+				$this->table_prefix.'sessions'        => array(
28 28
 					'u2f_request'    => array('TEXT', null),
29 29
 				),
30 30
 			),
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	{
36 36
 		return array(
37 37
 			'drop_columns'        => array(
38
-				$this->table_prefix . 'sessions'        => array(
38
+				$this->table_prefix.'sessions'        => array(
39 39
 					'u2f_request',
40 40
 				),
41 41
 			),
Please login to merge, or discard this patch.
helper/session_helper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function __construct(driver_interface $db, config $config, user $user, service_collection $modules, $registration_table, $user_table)
74 74
 	{
75
-		$this->db					= $db;
76
-		$this->user					= $user;
77
-		$this->config				= $config;
78
-		$this->registration_table	= $registration_table;
79
-		$this->user_table			= $user_table;
75
+		$this->db = $db;
76
+		$this->user = $user;
77
+		$this->config = $config;
78
+		$this->registration_table = $registration_table;
79
+		$this->user_table = $user_table;
80 80
 
81 81
 		$this->validateModules($modules);
82 82
 	}
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	{
203 203
 		if (empty($userdata))
204 204
 		{
205
-			$sql = 'SELECT * FROM ' . $this->user_table . 'WHERE user_id = ' . (int) $user_id;
205
+			$sql = 'SELECT * FROM '.$this->user_table.'WHERE user_id = '.(int) $user_id;
206 206
 			$result = $this->db->sql_query($sql);
207 207
 			$userdata = $this->db->sql_fetchrow($result);
208 208
 			$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.