@@ -162,8 +162,7 @@ |
||
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']) |
@@ -87,15 +87,15 @@ discard block |
||
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 | |
@@ -130,9 +130,9 @@ discard block |
||
130 | 130 | 'tfa_random' => '', |
131 | 131 | 'tfa_uid' => 0, |
132 | 132 | ); |
133 | - $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' |
|
133 | + $sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' |
|
134 | 134 | WHERE |
135 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND |
|
135 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND |
|
136 | 136 | session_user_id = ' . (int) $this->user->data['user_id']; |
137 | 137 | $this->db->sql_query($sql); |
138 | 138 | |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | if ($admin) |
171 | 171 | { |
172 | 172 | // the login array is used because the user ids do not differ for re-authentication |
173 | - $sql = 'DELETE FROM ' . SESSIONS_TABLE . " |
|
174 | - WHERE session_id = '" . $this->db->sql_escape($old_session_id) . "' |
|
173 | + $sql = 'DELETE FROM '.SESSIONS_TABLE." |
|
174 | + WHERE session_id = '" . $this->db->sql_escape($old_session_id)."' |
|
175 | 175 | AND session_user_id = " . (int) $user_id; |
176 | 176 | $this->db->sql_query($sql); |
177 | 177 |