| @@ -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) | 
| 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,7 +129,7 @@ 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 | } | 
| @@ -137,7 +137,7 @@ discard block | ||
| 137 | 137 |  			{ | 
| 138 | 138 |  				$this->user->add_lang_ext('paul999/tfa', 'common'); | 
| 139 | 139 |  				$url = append_sid("{$this->root_path}ucp.{$this->php_ext}", "i={$ucp_mode}"); | 
| 140 | -				trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="' . $url . '">', '</a>'), E_USER_WARNING); | |
| 140 | +				trigger_error($this->user->lang('TFA_REQUIRED_KEY_MISSING', '<a href="'.$url.'">', '</a>'), E_USER_WARNING); | |
| 141 | 141 | } | 
| 142 | 142 | } | 
| 143 | 143 | } | 
| @@ -175,7 +175,7 @@ discard block | ||
| 175 | 175 | 'admin' => (int) $event['admin'], | 
| 176 | 176 | 'auto_login' => (int) $event['auto_login'], | 
| 177 | 177 |  						'viewonline'	=> (int) !$this->request->is_set_post('viewonline'), | 
| 178 | - )) . '?redirect=' . $redirect | |
| 178 | + )).'?redirect='.$redirect | |
| 179 | 179 | ); | 
| 180 | 180 | } | 
| 181 | 181 | } | 
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 | 'title' => 'ACP_TFA_SETTINGS', | 
| 44 | 44 | 'vars' => array( | 
| 45 | 45 | 'legend1' => 'ACP_TFA_SETTINGS', | 
| 46 | -				'tfa_mode'				=> array('lang' => 'TFA_MODE',			'validate' => 'bool',	'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true), | |
| 46 | +				'tfa_mode'				=> array('lang' => 'TFA_MODE', 'validate' => 'bool', 'type' => 'select', 'method' => 'select_tfa_method', 'explain' => true), | |
| 47 | 47 | |
| 48 | 48 | 'legend4' => 'ACP_SUBMIT_CHANGES', | 
| 49 | 49 | ) | 
| @@ -97,12 +97,12 @@ discard block | ||
| 97 | 97 | |
| 98 | 98 | if ($submit) | 
| 99 | 99 |  		{ | 
| 100 | -			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_' . strtoupper($mode)); | |
| 100 | +			$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_TFA_CONFIG_'.strtoupper($mode)); | |
| 101 | 101 | |
| 102 | 102 |  			$message = $user->lang('CONFIG_UPDATED'); | 
| 103 | 103 | $message_type = E_USER_NOTICE; | 
| 104 | 104 | |
| 105 | - trigger_error($message . adm_back_link($this->u_action), $message_type); | |
| 105 | + trigger_error($message.adm_back_link($this->u_action), $message_type); | |
| 106 | 106 | } | 
| 107 | 107 | |
| 108 | 108 | if (!$request->is_secure()) | 
| @@ -115,7 +115,7 @@ discard block | ||
| 115 | 115 | |
| 116 | 116 | $template->assign_vars(array( | 
| 117 | 117 | 'L_TITLE' => $user->lang[$display_vars['title']], | 
| 118 | - 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'], | |
| 118 | + 'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'].'_EXPLAIN'], | |
| 119 | 119 | |
| 120 | 120 | 'S_ERROR' => (sizeof($error)) ? true : false, | 
| 121 | 121 |  			'ERROR_MSG'			=> implode('<br />', $error), | 
| @@ -144,9 +144,9 @@ discard block | ||
| 144 | 144 |  			$type = explode(':', $vars['type']); | 
| 145 | 145 | |
| 146 | 146 | $l_explain = ''; | 
| 147 | - if ($vars['explain'] && isset($user->lang[$vars['lang'] . '_EXPLAIN'])) | |
| 147 | + if ($vars['explain'] && isset($user->lang[$vars['lang'].'_EXPLAIN'])) | |
| 148 | 148 |  			{ | 
| 149 | - $l_explain = $user->lang[$vars['lang'] . '_EXPLAIN']; | |
| 149 | + $l_explain = $user->lang[$vars['lang'].'_EXPLAIN']; | |
| 150 | 150 | } | 
| 151 | 151 | |
| 152 | 152 | $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars); | 
| @@ -187,7 +187,7 @@ discard block | ||
| 187 | 187 | foreach ($act_ary as $key => $data) | 
| 188 | 188 |  		{ | 
| 189 | 189 | $selected = ($data == $selected_value) ? ' selected="selected"' : ''; | 
| 190 | - $act_options .= '<option value="' . $data . '"' . $selected . '>' . $user->lang($key) . '</option>'; | |
| 190 | + $act_options .= '<option value="'.$data.'"'.$selected.'>'.$user->lang($key).'</option>'; | |
| 191 | 191 | } | 
| 192 | 192 | return $act_options; | 
| 193 | 193 | } | 
| @@ -42,8 +42,8 @@ | ||
| 42 | 42 | protected function role_exists($role) | 
| 43 | 43 |  	{ | 
| 44 | 44 | $sql = 'SELECT role_id | 
| 45 | - FROM ' . ACL_ROLES_TABLE . " | |
| 46 | - WHERE role_name = '" . $this->db->sql_escape($role) . "'"; | |
| 45 | + FROM ' . ACL_ROLES_TABLE." | |
| 46 | + WHERE role_name = '" . $this->db->sql_escape($role)."'"; | |
| 47 | 47 | $result = $this->db->sql_query_limit($sql, 1); | 
| 48 | 48 |  		$role_id = $this->db->sql_fetchfield('role_id'); | 
| 49 | 49 | $this->db->sql_freeresult($result); | 
| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 |  	{ | 
| 17 | 17 | return array( | 
| 18 | 18 | 'add_tables' => array( | 
| 19 | - $this->table_prefix . 'tfa_registration' => array( | |
| 19 | + $this->table_prefix.'tfa_registration' => array( | |
| 20 | 20 | 'COLUMNS' => array( | 
| 21 | 21 |  						'registration_id'		=> array('UINT', null, 'auto_increment'), | 
| 22 | 22 |  						'user_id'				=> array('UINT', 0), | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 |  	{ | 
| 41 | 41 | return array( | 
| 42 | 42 | 'drop_tables' => array( | 
| 43 | - $this->table_prefix . 'tfa_registration', | |
| 43 | + $this->table_prefix.'tfa_registration', | |
| 44 | 44 | ), | 
| 45 | 45 | ); | 
| 46 | 46 | } | 
| @@ -24,7 +24,7 @@ discard block | ||
| 24 | 24 |  	{ | 
| 25 | 25 | return array( | 
| 26 | 26 | 'add_columns' => array( | 
| 27 | - $this->table_prefix . 'sessions' => array( | |
| 27 | + $this->table_prefix.'sessions' => array( | |
| 28 | 28 |  					'u2f_request'    => array('TEXT', null), | 
| 29 | 29 | ), | 
| 30 | 30 | ), | 
| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 |  	{ | 
| 36 | 36 | return array( | 
| 37 | 37 | 'drop_columns' => array( | 
| 38 | - $this->table_prefix . 'sessions' => array( | |
| 38 | + $this->table_prefix.'sessions' => array( | |
| 39 | 39 | 'u2f_request', | 
| 40 | 40 | ), | 
| 41 | 41 | ), | 
| @@ -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 | |
| @@ -225,8 +225,8 @@ discard block | ||
| 225 | 225 | if ($admin) | 
| 226 | 226 |  			{ | 
| 227 | 227 | // the login array is used because the user ids do not differ for re-authentication | 
| 228 | - $sql = 'DELETE FROM ' . SESSIONS_TABLE . " | |
| 229 | - WHERE session_id = '" . $this->db->sql_escape($old_session_id) . "' | |
| 228 | + $sql = 'DELETE FROM '.SESSIONS_TABLE." | |
| 229 | + WHERE session_id = '" . $this->db->sql_escape($old_session_id)."' | |
| 230 | 230 | AND session_user_id = " . (int) $user_id; | 
| 231 | 231 | $this->db->sql_query($sql); | 
| 232 | 232 | |
| @@ -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 | } | 
| @@ -202,7 +202,7 @@ discard block | ||
| 202 | 202 |  	{ | 
| 203 | 203 | if (empty($userdata)) | 
| 204 | 204 |  		{ | 
| 205 | - $sql = 'SELECT * FROM ' . $this->user_table . 'WHERE user_id = ' . (int) $user_id; | |
| 205 | + $sql = 'SELECT * FROM '.$this->user_table.'WHERE user_id = '.(int) $user_id; | |
| 206 | 206 | $result = $this->db->sql_query($sql); | 
| 207 | 207 | $userdata = $this->db->sql_fetchrow($result); | 
| 208 | 208 | $this->db->sql_freeresult($result); | 
| @@ -102,7 +102,7 @@ discard block | ||
| 102 | 102 |  				{ | 
| 103 | 103 | $module->register(); | 
| 104 | 104 | meta_refresh(3, $this->u_action); | 
| 105 | - $message = $this->user->lang['TFA_KEY_ADDED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); | |
| 105 | + $message = $this->user->lang['TFA_KEY_ADDED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>'); | |
| 106 | 106 | trigger_error($message); | 
| 107 | 107 | } | 
| 108 | 108 | if ($module->can_register()) | 
| @@ -227,7 +227,7 @@ discard block | ||
| 227 | 227 | } | 
| 228 | 228 | } | 
| 229 | 229 | meta_refresh(3, $this->u_action); | 
| 230 | - $message = $this->user->lang['TFA_KEYS_DELETED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>'); | |
| 230 | + $message = $this->user->lang['TFA_KEYS_DELETED'].'<br /><br />'.sprintf($this->user->lang['RETURN_UCP'], '<a href="'.$this->u_action.'">', '</a>'); | |
| 231 | 231 | trigger_error($message); | 
| 232 | 232 | } | 
| 233 | 233 | } | 
| @@ -76,11 +76,11 @@ discard block | ||
| 76 | 76 | $this->user = $user; | 
| 77 | 77 | $this->request = $request; | 
| 78 | 78 | $this->template = $template; | 
| 79 | - $this->root_path= $root_path; | |
| 79 | + $this->root_path = $root_path; | |
| 80 | 80 | |
| 81 | - $this->registration_table = $registration_table; | |
| 81 | + $this->registration_table = $registration_table; | |
| 82 | 82 | |
| 83 | -		$this->u2f = new \paul999\u2f\U2F('https://' . $this->request->server('HTTP_HOST')); | |
| 83 | +		$this->u2f = new \paul999\u2f\U2F('https://'.$this->request->server('HTTP_HOST')); | |
| 84 | 84 | } | 
| 85 | 85 | |
| 86 | 86 | /** | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | return false; | 
| 114 | 114 | } | 
| 115 | 115 | $sql = 'SELECT COUNT(registration_id) as reg_id | 
| 116 | - FROM ' . $this->registration_table . ' | |
| 116 | + FROM ' . $this->registration_table.' | |
| 117 | 117 | WHERE | 
| 118 | 118 | user_id = ' . (int) $user_id; | 
| 119 | 119 | $result = $this->db->sql_query($sql); | 
| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 | */ | 
| 135 | 135 | public function is_potentially_usable($user_id = false) | 
| 136 | 136 |  	{ | 
| 137 | - $browsercap = new Browscap($this->root_path . 'cache/'); | |
| 137 | + $browsercap = new Browscap($this->root_path.'cache/'); | |
| 138 | 138 |  		$info = $browsercap->getBrowser($this->request->server('HTTP_USER_AGENT')); | 
| 139 | 139 | return strtolower($info->Browser) === 'chrome' && $this->is_ssl(); | 
| 140 | 140 | } | 
| @@ -187,9 +187,9 @@ discard block | ||
| 187 | 187 | 'u2f_request' => $registrations | 
| 188 | 188 | ); | 
| 189 | 189 | |
| 190 | -		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' | |
| 190 | +		$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' | |
| 191 | 191 | WHERE | 
| 192 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND | |
| 192 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND | |
| 193 | 193 | session_user_id = ' . (int) $this->user->data['user_id']; | 
| 194 | 194 | $this->db->sql_query($sql); | 
| 195 | 195 | $count = $this->db->sql_affectedrows(); | 
| @@ -200,9 +200,9 @@ discard block | ||
| 200 | 200 |  			{ | 
| 201 | 201 | // Reset sessions table. We had multiple sessions with same ID!!! | 
| 202 | 202 | $sql_ary['u2f_request'] = ''; | 
| 203 | -				$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' | |
| 203 | +				$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' | |
| 204 | 204 | WHERE | 
| 205 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND | |
| 205 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND | |
| 206 | 206 | session_user_id = ' . (int) $this->user->data['user_id']; | 
| 207 | 207 | $this->db->sql_query($sql); | 
| 208 | 208 | } | 
| @@ -222,9 +222,9 @@ discard block | ||
| 222 | 222 | try | 
| 223 | 223 |  		{ | 
| 224 | 224 | $sql = 'SELECT u2f_request | 
| 225 | - FROM ' . SESSIONS_TABLE . ' | |
| 225 | + FROM ' . SESSIONS_TABLE.' | |
| 226 | 226 | WHERE | 
| 227 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND | |
| 227 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND | |
| 228 | 228 | session_user_id = ' . (int) $this->user->data['user_id']; | 
| 229 | 229 | $result = $this->db->sql_query($sql); | 
| 230 | 230 | $row = $this->db->sql_fetchrow($result); | 
| @@ -254,7 +254,7 @@ discard block | ||
| 254 | 254 | 'last_used' => time(), | 
| 255 | 255 | ); | 
| 256 | 256 | |
| 257 | -			$sql = 'UPDATE ' . $this->registration_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE registration_id = ' . (int) $reg->getId(); | |
| 257 | +			$sql = 'UPDATE '.$this->registration_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' WHERE registration_id = '.(int) $reg->getId(); | |
| 258 | 258 | $this->db->sql_query($sql); | 
| 259 | 259 | } | 
| 260 | 260 | catch (U2fError $error) | 
| @@ -263,7 +263,7 @@ discard block | ||
| 263 | 263 | } | 
| 264 | 264 | catch (\InvalidArgumentException $invalid) | 
| 265 | 265 |  		{ | 
| 266 | -			throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG') . '<br />' . $invalid->getMessage(), $invalid); | |
| 266 | +			throw new BadRequestHttpException($this->user->lang('TFA_SOMETHING_WENT_WRONG').'<br />'.$invalid->getMessage(), $invalid); | |
| 267 | 267 | } | 
| 268 | 268 | } | 
| 269 | 269 | |
| @@ -288,8 +288,8 @@ discard block | ||
| 288 | 288 | public function register_start() | 
| 289 | 289 |  	{ | 
| 290 | 290 | $sql = 'SELECT * | 
| 291 | - FROM ' . $this->registration_table . ' | |
| 292 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' | |
| 291 | + FROM ' . $this->registration_table.' | |
| 292 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' | |
| 293 | 293 | ORDER BY registration_id ASC'; | 
| 294 | 294 | |
| 295 | 295 | $result = $this->db->sql_query($sql); | 
| @@ -366,7 +366,7 @@ discard block | ||
| 366 | 366 | 'last_used' => time(), | 
| 367 | 367 | ); | 
| 368 | 368 | |
| 369 | -			$sql = 'INSERT INTO ' . $this->registration_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); | |
| 369 | +			$sql = 'INSERT INTO '.$this->registration_table.' '.$this->db->sql_build_array('INSERT', $sql_ary); | |
| 370 | 370 | $this->db->sql_query($sql); | 
| 371 | 371 | |
| 372 | 372 | $sql_ary = array( | 
| @@ -388,8 +388,8 @@ discard block | ||
| 388 | 388 | public function show_ucp() | 
| 389 | 389 |  	{ | 
| 390 | 390 | $sql = 'SELECT * | 
| 391 | - FROM ' . $this->registration_table . ' | |
| 392 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' | |
| 391 | + FROM ' . $this->registration_table.' | |
| 392 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' | |
| 393 | 393 | ORDER BY registration_id ASC'; | 
| 394 | 394 | |
| 395 | 395 | $result = $this->db->sql_query($sql); | 
| @@ -415,8 +415,8 @@ discard block | ||
| 415 | 415 | */ | 
| 416 | 416 | public function delete($key) | 
| 417 | 417 |  	{ | 
| 418 | - $sql = 'DELETE FROM ' . $this->registration_table . ' | |
| 419 | - WHERE user_id = ' . (int) $this->user->data['user_id'] . ' | |
| 418 | + $sql = 'DELETE FROM '.$this->registration_table.' | |
| 419 | + WHERE user_id = ' . (int) $this->user->data['user_id'].' | |
| 420 | 420 | AND registration_id =' . (int) $key; | 
| 421 | 421 | |
| 422 | 422 | $this->db->sql_query($sql); | 
| @@ -459,7 +459,7 @@ discard block | ||
| 459 | 459 | */ | 
| 460 | 460 | private function getRegistrations($user_id) | 
| 461 | 461 |  	{ | 
| 462 | - $sql = 'SELECT * FROM ' . $this->registration_table . ' WHERE user_id = ' . (int) $user_id; | |
| 462 | + $sql = 'SELECT * FROM '.$this->registration_table.' WHERE user_id = '.(int) $user_id; | |
| 463 | 463 | $result = $this->db->sql_query($sql); | 
| 464 | 464 | $rows = array(); | 
| 465 | 465 | |
| @@ -547,9 +547,9 @@ discard block | ||
| 547 | 547 | */ | 
| 548 | 548 | private function update_session($sql_ary) | 
| 549 | 549 |  	{ | 
| 550 | -		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' | |
| 550 | +		$sql = 'UPDATE '.SESSIONS_TABLE.' SET '.$this->db->sql_build_array('UPDATE', $sql_ary).' | |
| 551 | 551 | WHERE | 
| 552 | - session_id = \'' . $this->db->sql_escape($this->user->data['session_id']) . '\' AND | |
| 552 | + session_id = \'' . $this->db->sql_escape($this->user->data['session_id']).'\' AND | |
| 553 | 553 | session_user_id = ' . (int) $this->user->data['user_id']; | 
| 554 | 554 | $this->db->sql_query($sql); | 
| 555 | 555 | |