@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | ) { |
78 | 78 | // Not allowed page |
79 | 79 | $session->set('system-error_code', ERR_NOT_ALLOWED); |
80 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
80 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
81 | 81 | exit; |
82 | 82 | } |
83 | 83 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | if (isset($order['column']) && preg_match('#^(asc|desc)$#i', $order['dir'])) { |
130 | 130 | $columnIndex = filter_var($order['column'], FILTER_SANITIZE_NUMBER_INT); |
131 | 131 | $dir = filter_var($order['dir'], FILTER_SANITIZE_FULL_SPECIAL_CHARS); |
132 | - $sOrder .= $aColumns[$columnIndex] . ' ' . $dir . ', '; |
|
132 | + $sOrder .= $aColumns[$columnIndex].' '.$dir.', '; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | $sOrder = substr_replace($sOrder, '', -2); |
@@ -153,15 +153,15 @@ discard block |
||
153 | 153 | |
154 | 154 | if ($letter !== '' && $letter !== 'None') { |
155 | 155 | $sWhere .= ' AND ('; |
156 | - $sWhere .= $aColumns[1] . " LIKE '" . $letter . "%' OR "; |
|
157 | - $sWhere .= $aColumns[2] . " LIKE '" . $letter . "%' OR "; |
|
158 | - $sWhere .= $aColumns[3] . " LIKE '" . $letter . "%' "; |
|
156 | + $sWhere .= $aColumns[1]." LIKE '".$letter."%' OR "; |
|
157 | + $sWhere .= $aColumns[2]." LIKE '".$letter."%' OR "; |
|
158 | + $sWhere .= $aColumns[3]." LIKE '".$letter."%' "; |
|
159 | 159 | $sWhere .= ')'; |
160 | 160 | } elseif ($searchValue !== '') { |
161 | 161 | $sWhere .= ' AND ('; |
162 | - $sWhere .= $aColumns[1] . " LIKE '" . $searchValue . "%' OR "; |
|
163 | - $sWhere .= $aColumns[2] . " LIKE '" . $searchValue . "%' OR "; |
|
164 | - $sWhere .= $aColumns[3] . " LIKE '" . $searchValue . "%' "; |
|
162 | + $sWhere .= $aColumns[1]." LIKE '".$searchValue."%' OR "; |
|
163 | + $sWhere .= $aColumns[2]." LIKE '".$searchValue."%' OR "; |
|
164 | + $sWhere .= $aColumns[3]." LIKE '".$searchValue."%' "; |
|
165 | 165 | $sWhere .= ')'; |
166 | 166 | } |
167 | 167 | |
@@ -254,31 +254,29 @@ discard block |
||
254 | 254 | |
255 | 255 | // Get some infos about user |
256 | 256 | $userDisplayInfos = |
257 | - (isset($userDate['date']) ? '<i class=\"fas fa-calendar-day infotip text-info ml-2\" title=\"'.$lang->get('creation_date').': '.date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $userDate['date']).'\"></i>' : '') |
|
257 | + (isset($userDate['date']) ? '<i class=\"fas fa-calendar-day infotip text-info ml-2\" title=\"'.$lang->get('creation_date').': '.date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $userDate['date']).'\"></i>' : '') |
|
258 | 258 | . |
259 | 259 | ((int) $record['last_connexion'] > 0 ? '<i class=\"far fa-clock infotip text-info ml-2\" title=\"'.$lang->get('index_last_seen').": ". |
260 | - date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $record['last_connexion']).'\"></i>' : '') |
|
260 | + date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $record['last_connexion']).'\"></i>' : '') |
|
261 | 261 | . |
262 | 262 | ((int) $record['user_ip'] > 0 ? '<i class=\"fas fa-street-view infotip text-info ml-1\" title=\"'.$lang->get('ip').": ".($record['user_ip']).'\"></i>' : '') |
263 | 263 | . |
264 | 264 | ($record['auth_type'] === 'ldap' ? '<i class=\"far fa-address-book infotip text-warning ml-1\" title=\"'.$lang->get('managed_through_ad').'\"></i>' : '') |
265 | 265 | . |
266 | 266 | ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['admin'] !== 1 && ((int) $SETTINGS['duo'] === 1 || (int) $SETTINGS['google_authentication'] === 1)) ? |
267 | - ((int) $record['mfa_enabled'] === 1 ? '' : '<i class=\"fa-solid fa-fingerprint infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('mfa_disabled_for_user').'\"></i>') : |
|
268 | - '' |
|
267 | + ((int) $record['mfa_enabled'] === 1 ? '' : '<i class=\"fa-solid fa-fingerprint infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('mfa_disabled_for_user').'\"></i>') : '' |
|
269 | 268 | ); |
270 | 269 | if ($request->query->filter('display_warnings', '', FILTER_VALIDATE_BOOLEAN) === true) { |
271 | 270 | $userDisplayInfos .= '<br>'. |
272 | 271 | ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['admin'] !== 1 && is_null($record['keys_recovery_time']) === true) ? |
273 | - '<i class=\"fa-solid fa-download infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('recovery_keys_not_downloaded').'\"></i>' : |
|
274 | - '' |
|
272 | + '<i class=\"fa-solid fa-download infotip ml-1\" style=\"color:Tomato\" title=\"'.$lang->get('recovery_keys_not_downloaded').'\"></i>' : '' |
|
275 | 273 | ). |
276 | 274 | ((in_array($record['id'], [OTV_USER_ID, TP_USER_ID, SSH_USER_ID, API_USER_ID]) === false && (int) $record['pw_passwordlib'] === 1) ? '<i class=\"fa-solid fa-person-walking-luggage infotip ml-1\" style=\"color:Tomato\" title=\"Old password encryption. Shall login to initialize.\"></i>' : ''); |
277 | 275 | } |
278 | 276 | |
279 | 277 | $sOutput .= '["<span data-id=\"'.$record['id'].'\" data-fullname=\"'. |
280 | - (empty($record['name']) === false ? htmlentities($record['name'], ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED) : '').' '. |
|
281 | - (empty($record['lastname']) === false ? htmlentities($record['lastname'], ENT_QUOTES|ENT_SUBSTITUTE|ENT_DISALLOWED) : ''). |
|
278 | + (empty($record['name']) === false ? htmlentities($record['name'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED) : '').' '. |
|
279 | + (empty($record['lastname']) === false ? htmlentities($record['lastname'], ENT_QUOTES | ENT_SUBSTITUTE | ENT_DISALLOWED) : ''). |
|
282 | 280 | '\" data-auth-type=\"'.$record['auth_type'].'\" data-special=\"'.$record['special'].'\" data-mfa-enabled=\"'.$record['mfa_enabled'].'\" data-otp-provided=\"'.(isset($record['otp_provided']) === true ? $record['otp_provided'] : '').'\"></span>", '; |
283 | 281 | //col2 |
284 | 282 | $sOutput .= '"'. |