@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | protected function show_ucp_complete($table, $where = '') |
39 | 39 | { |
40 | 40 | $sql = 'SELECT * |
41 | - FROM ' . $table . ' |
|
41 | + FROM ' . $table.' |
|
42 | 42 | WHERE |
43 | - user_id = ' . (int) $this->user->data['user_id'] . ' |
|
44 | - ' . $where . ' |
|
43 | + user_id = ' . (int) $this->user->data['user_id'].' |
|
44 | + ' . $where.' |
|
45 | 45 | ORDER BY registration_id ASC'; |
46 | 46 | |
47 | 47 | $result = $this->db->sql_query($sql); |
@@ -71,10 +71,10 @@ discard block |
||
71 | 71 | protected function check_table_for_user($table, $user_id, $where = '') |
72 | 72 | { |
73 | 73 | $sql = 'SELECT COUNT(registration_id) as reg_id |
74 | - FROM ' . $table . ' |
|
74 | + FROM ' . $table.' |
|
75 | 75 | WHERE |
76 | - user_id = ' . (int) $user_id . |
|
77 | - ' ' . $where; |
|
76 | + user_id = ' . (int) $user_id. |
|
77 | + ' '.$where; |
|
78 | 78 | $result = $this->db->sql_query($sql); |
79 | 79 | $row = $this->db->sql_fetchrow($result); |
80 | 80 | $this->db->sql_freeresult($result); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | return array( |
18 | 18 | 'add_tables' => array( |
19 | - $this->table_prefix . 'tfa_back_reg' => array( |
|
19 | + $this->table_prefix.'tfa_back_reg' => array( |
|
20 | 20 | 'COLUMNS' => array( |
21 | 21 | 'registration_id' => array('UINT', null, 'auto_increment'), |
22 | 22 | 'user_id' => array('UINT', 0), |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | return array( |
40 | 40 | 'drop_tables' => array( |
41 | - $this->table_prefix . 'tfa_back_reg', |
|
41 | + $this->table_prefix.'tfa_back_reg', |
|
42 | 42 | ), |
43 | 43 | ); |
44 | 44 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | return array( |
18 | 18 | 'add_tables' => array( |
19 | - $this->table_prefix . 'tfa_otp_reg' => array( |
|
19 | + $this->table_prefix.'tfa_otp_reg' => array( |
|
20 | 20 | 'COLUMNS' => array( |
21 | 21 | 'registration_id' => array('UINT', null, 'auto_increment'), |
22 | 22 | 'user_id' => array('UINT', 0), |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | return array( |
39 | 39 | 'drop_tables' => array( |
40 | - $this->table_prefix . 'tfa_otp_reg', |
|
40 | + $this->table_prefix.'tfa_otp_reg', |
|
41 | 41 | ), |
42 | 42 | ); |
43 | 43 | } |
@@ -182,8 +182,8 @@ discard block |
||
182 | 182 | 'last_used' => time(), |
183 | 183 | 'valid' => false, |
184 | 184 | ); |
185 | - $sql = 'UPDATE ' . $this->backup_registration_table . ' |
|
186 | - SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
185 | + $sql = 'UPDATE '.$this->backup_registration_table.' |
|
186 | + SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).' |
|
187 | 187 | WHERE |
188 | 188 | registration_id = ' . (int) $registration['registration_id']; |
189 | 189 | $this->db->sql_query($sql); |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | */ |
266 | 266 | public function delete($key) |
267 | 267 | { |
268 | - $sql = 'DELETE FROM ' . $this->backup_registration_table . ' |
|
269 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' |
|
268 | + $sql = 'DELETE FROM '.$this->backup_registration_table.' |
|
269 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' |
|
270 | 270 | AND registration_id =' . (int) $key; |
271 | 271 | |
272 | 272 | $this->db->sql_query($sql); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | private function getRegistrations($user_id) |
281 | 281 | { |
282 | - $sql = 'SELECT * FROM ' . $this->backup_registration_table . ' WHERE user_id = ' . (int) $user_id; |
|
282 | + $sql = 'SELECT * FROM '.$this->backup_registration_table.' WHERE user_id = '.(int) $user_id; |
|
283 | 283 | $result = $this->db->sql_query($sql); |
284 | 284 | $rows = $this->db->sql_fetchrowset($result); |
285 | 285 |
@@ -88,13 +88,13 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function __construct(driver_interface $db, config $config, user $user, service_collection $modules, template $template, helper $controller_helper, $registration_table, $user_table) |
90 | 90 | { |
91 | - $this->db = $db; |
|
92 | - $this->user = $user; |
|
93 | - $this->config = $config; |
|
94 | - $this->template = $template; |
|
91 | + $this->db = $db; |
|
92 | + $this->user = $user; |
|
93 | + $this->config = $config; |
|
94 | + $this->template = $template; |
|
95 | 95 | $this->controller_helper = $controller_helper; |
96 | 96 | $this->registration_table = $registration_table; |
97 | - $this->user_table = $user_table; |
|
97 | + $this->user_table = $user_table; |
|
98 | 98 | |
99 | 99 | $this->validateModules($modules); |
100 | 100 | |
@@ -258,9 +258,9 @@ discard block |
||
258 | 258 | 'tfa_random' => $random, |
259 | 259 | 'tfa_uid' => $user_id, |
260 | 260 | ); |
261 | - $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
261 | + $sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' |
|
262 | 262 | WHERE |
263 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND |
|
263 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND |
|
264 | 264 | session_user_id = ' . (int) $this->user->data['user_id']; |
265 | 265 | $this->db->sql_query($sql); |
266 | 266 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | if (empty($userdata)) |
290 | 290 | { |
291 | - $sql = 'SELECT * FROM ' . $this->user_table . ' WHERE user_id = ' . (int) $user_id; |
|
291 | + $sql = 'SELECT * FROM '.$this->user_table.' WHERE user_id = '.(int) $user_id; |
|
292 | 292 | $result = $this->db->sql_query($sql); |
293 | 293 | $userdata = $this->db->sql_fetchrow($result); |
294 | 294 | $this->db->sql_freeresult($result); |