@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function is_usable($user_id) |
108 | 108 | { |
109 | 109 | $sql = 'SELECT COUNT(registration_id) as reg_id |
110 | - FROM ' . $this->otp_registration_table . ' |
|
110 | + FROM ' . $this->otp_registration_table.' |
|
111 | 111 | WHERE |
112 | 112 | user_id = ' . (int) $user_id; |
113 | 113 | $result = $this->db->sql_query($sql); |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | public function register_start() |
190 | 190 | { |
191 | 191 | $secret = $this->otp->generateSecret(); |
192 | - $QR = $this->otp_helper->generateKeyURI('totp', $secret, generate_board_url(), '',0, 'sha1'); |
|
192 | + $QR = $this->otp_helper->generateKeyURI('totp', $secret, generate_board_url(), '', 0, 'sha1'); |
|
193 | 193 | $this->template->assign_vars(array( |
194 | - 'TFA_QR_CODE' => 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . $QR, |
|
194 | + 'TFA_QR_CODE' => 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='.$QR, |
|
195 | 195 | 'TFA_SECRET' => $secret, |
196 | 196 | 'L_TFA_ADD_OTP_KEY_EXPLAIN' => $this->user->lang('TFA_ADD_OTP_KEY_EXPLAIN', $secret), |
197 | 197 | 'S_HIDDEN_FIELDS_MODULE' => build_hidden_fields(array( |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | public function register() |
212 | 212 | { |
213 | 213 | $secret = $this->request->variable('secret', ''); |
214 | - $otp = $this->request->variable('register', ''); |
|
214 | + $otp = $this->request->variable('register', ''); |
|
215 | 215 | |
216 | 216 | if (!$this->otp->checkTOTP($secret, $otp, 'sha1')) |
217 | 217 | { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'last_used' => time(), |
226 | 226 | ); |
227 | 227 | |
228 | - $sql = 'INSERT INTO ' . $this->otp_registration_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); |
|
228 | + $sql = 'INSERT INTO '.$this->otp_registration_table.' '.$this->db->sql_build_array('INSERT', $sql_ary); |
|
229 | 229 | $this->db->sql_query($sql); |
230 | 230 | } |
231 | 231 | |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function delete($key) |
250 | 250 | { |
251 | - $sql = 'DELETE FROM ' . $this->otp_registration_table . ' |
|
252 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' |
|
251 | + $sql = 'DELETE FROM '.$this->otp_registration_table.' |
|
252 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' |
|
253 | 253 | AND registration_id =' . (int) $key; |
254 | 254 | |
255 | 255 | $this->db->sql_query($sql); |