@@ -190,8 +190,8 @@ discard block |
||
190 | 190 | $sql_ary = array( |
191 | 191 | 'last_used' => time(), |
192 | 192 | ); |
193 | - $sql = 'UPDATE ' . $this->otp_registration_table . ' |
|
194 | - SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
193 | + $sql = 'UPDATE '.$this->otp_registration_table.' |
|
194 | + SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).' |
|
195 | 195 | WHERE |
196 | 196 | registration_id = ' . (int) $registration['registration_id']; |
197 | 197 | $this->db->sql_query($sql); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $secret = $this->otp->generateSecret(); |
224 | 224 | $QR = $this->otp_helper->generateKeyURI('totp', $secret, $this->user->data['username'], generate_board_url(), 0, 'sha1'); |
225 | 225 | $this->template->assign_vars(array( |
226 | - 'TFA_QR_CODE' => 'https://quickchart.io/qr?size=200&margin=0&ecLevel=M&text=' . $QR, |
|
226 | + 'TFA_QR_CODE' => 'https://quickchart.io/qr?size=200&margin=0&ecLevel=M&text='.$QR, |
|
227 | 227 | 'TFA_SECRET' => $secret, |
228 | 228 | 'L_TFA_ADD_OTP_KEY_EXPLAIN' => $this->user->lang('TFA_ADD_OTP_KEY_EXPLAIN', $secret), |
229 | 229 | 'S_HIDDEN_FIELDS_MODULE' => build_hidden_fields(array( |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | public function register() |
243 | 243 | { |
244 | 244 | $secret = $this->request->variable('secret', ''); |
245 | - $otp = $this->request->variable('register', ''); |
|
245 | + $otp = $this->request->variable('register', ''); |
|
246 | 246 | |
247 | 247 | if (!$this->otp->checkTOTP($secret, $otp, 'sha1')) |
248 | 248 | { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | 'last_used' => time(), |
257 | 257 | ); |
258 | 258 | |
259 | - $sql = 'INSERT INTO ' . $this->otp_registration_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); |
|
259 | + $sql = 'INSERT INTO '.$this->otp_registration_table.' '.$this->db->sql_build_array('INSERT', $sql_ary); |
|
260 | 260 | $this->db->sql_query($sql); |
261 | 261 | } |
262 | 262 | |
@@ -279,8 +279,8 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function delete($key) |
281 | 281 | { |
282 | - $sql = 'DELETE FROM ' . $this->otp_registration_table . ' |
|
283 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' |
|
282 | + $sql = 'DELETE FROM '.$this->otp_registration_table.' |
|
283 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' |
|
284 | 284 | AND registration_id =' . (int) $key; |
285 | 285 | |
286 | 286 | $this->db->sql_query($sql); |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | private function getRegistrations($user_id) |
295 | 295 | { |
296 | - $sql = 'SELECT * FROM ' . $this->otp_registration_table . ' WHERE user_id = ' . (int) $user_id; |
|
296 | + $sql = 'SELECT * FROM '.$this->otp_registration_table.' WHERE user_id = '.(int) $user_id; |
|
297 | 297 | $result = $this->db->sql_query($sql); |
298 | 298 | $rows = $this->db->sql_fetchrowset($result); |
299 | 299 |