@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function __construct(driver_interface $db, config $config, user $user, service_collection $modules, $registration_table, $user_table) |
| 74 | 74 | { |
| 75 | - $this->db = $db; |
|
| 76 | - $this->user = $user; |
|
| 77 | - $this->config = $config; |
|
| 78 | - $this->registration_table = $registration_table; |
|
| 79 | - $this->user_table = $user_table; |
|
| 75 | + $this->db = $db; |
|
| 76 | + $this->user = $user; |
|
| 77 | + $this->config = $config; |
|
| 78 | + $this->registration_table = $registration_table; |
|
| 79 | + $this->user_table = $user_table; |
|
| 80 | 80 | |
| 81 | 81 | $this->validateModules($modules); |
| 82 | 82 | } |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | { |
| 205 | 205 | if (empty($userdata)) |
| 206 | 206 | { |
| 207 | - $sql = 'SELECT * FROM ' . $this->user_table . ' WHERE user_id = ' . (int) $user_id; |
|
| 207 | + $sql = 'SELECT * FROM '.$this->user_table.' WHERE user_id = '.(int) $user_id; |
|
| 208 | 208 | $result = $this->db->sql_query($sql); |
| 209 | 209 | $userdata = $this->db->sql_fetchrow($result); |
| 210 | 210 | $this->db->sql_freeresult($result); |
@@ -76,14 +76,14 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function __construct(session_helper_interface $helper, helper $controller_helper, user $user, request_interface $request, driver_interface $db, config $config, $php_ext, $root_path) |
| 78 | 78 | { |
| 79 | - $this->helper = $helper; |
|
| 80 | - $this->controller_helper = $controller_helper; |
|
| 81 | - $this->user = $user; |
|
| 79 | + $this->helper = $helper; |
|
| 80 | + $this->controller_helper = $controller_helper; |
|
| 81 | + $this->user = $user; |
|
| 82 | 82 | $this->request = $request; |
| 83 | - $this->config = $config; |
|
| 84 | - $this->db = $db; |
|
| 83 | + $this->config = $config; |
|
| 84 | + $this->db = $db; |
|
| 85 | 85 | $this->php_ext = $php_ext; |
| 86 | - $this->root_path = $root_path; |
|
| 86 | + $this->root_path = $root_path; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | if ($this->user->data['is_bot'] == false && $this->user->data['user_id'] != ANONYMOUS && $this->helper->isTfaRequired($this->user->data['user_id'], false, $this->user->data) && !$this->helper->isTfaRegistered($this->user->data['user_id'])) |
| 119 | 119 | { |
| 120 | - $sql = 'SELECT module_id FROM ' . MODULES_TABLE . ' WHERE module_langname = \'UCP_TFA\' OR module_langname = \'UCP_TFA_MANAGE\''; |
|
| 120 | + $sql = 'SELECT module_id FROM '.MODULES_TABLE.' WHERE module_langname = \'UCP_TFA\' OR module_langname = \'UCP_TFA_MANAGE\''; |
|
| 121 | 121 | $result = $this->db->sql_query($sql); |
| 122 | 122 | $allowed_i = array(); |
| 123 | 123 | |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | $ucp_mode = "-paul999-tfa-ucp-tfa_module"; |
| 130 | 130 | $allowed_i[] = $ucp_mode; |
| 131 | 131 | |
| 132 | - if ($this->user->page['page_name'] == 'ucp.' . $this->php_ext && in_array($this->request->variable('i', ''), $allowed_i)) |
|
| 132 | + if ($this->user->page['page_name'] == 'ucp.'.$this->php_ext && in_array($this->request->variable('i', ''), $allowed_i)) |
|
| 133 | 133 | { |
| 134 | 134 | return; // We are at our UCP page, so skip any other checks. This page is always available |
| 135 | 135 | } |
| 136 | 136 | $this->user->add_lang_ext('paul999/tfa', 'common'); |
| 137 | 137 | $url = append_sid("{$this->root_path}ucp.{$this->php_ext}", "i={$ucp_mode}"); |
| 138 | - trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="' . $url . '">', '</a>'), E_USER_WARNING); |
|
| 138 | + trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="'.$url.'">', '</a>'), E_USER_WARNING); |
|
| 139 | 139 | |
| 140 | 140 | } |
| 141 | 141 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | 'admin' => (int) $event['admin'], |
| 174 | 174 | 'auto_login' => (int) $event['auto_login'], |
| 175 | 175 | 'viewonline' => (int) !$this->request->is_set_post('viewonline'), |
| 176 | - )) . '?redirect=' . $redirect |
|
| 176 | + )).'?redirect='.$redirect |
|
| 177 | 177 | ); |
| 178 | 178 | } |
| 179 | 179 | } |