@@ 159-163 (lines=5) @@ | ||
156 | $redirect = $this->request->variable('redirect', "{$this->root_path}/index.{$this->php_ext}"); |
|
157 | try |
|
158 | { |
|
159 | if (!$module->login($user_id)) |
|
160 | { |
|
161 | $this->template->assign_var('S_ERROR', $this->user->lang('TFA_INCORRECT_KEY')); |
|
162 | $this->session_helper->generate_page($user_id, $admin, $auto_login, $viewonline, $redirect); |
|
163 | } |
|
164 | } |
|
165 | catch (http_exception $ex) // @TODO: Replace exception with own exception |
|
166 | { |
|
@@ 174-182 (lines=9) @@ | ||
171 | // Also log it to admin log just to be sure. |
|
172 | $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_TFA_EXCEPTION', $ex->getMessage()); |
|
173 | } |
|
174 | if ($ex->getStatusCode() == 400) |
|
175 | { |
|
176 | $this->template->assign_var('S_ERROR', $this->user->lang($ex->getMessage())); |
|
177 | $this->session_helper->generate_page($user_id, $admin, $auto_login, $viewonline, $redirect); |
|
178 | } |
|
179 | else |
|
180 | { |
|
181 | throw $ex; |
|
182 | } |
|
183 | } |
|
184 | ||
185 | $old_session_id = $this->user->session_id; |