Passed
Push — teampass_3.0 ( 6d5c11...b7a8cf )
by Nils
05:04 queued 10s
created
sources/identify.php 1 patch
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 // Load AntiXSS
46
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/voku/helper/AntiXSS.php';
46
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/voku/helper/AntiXSS.php';
47 47
 $antiXss = new voku\helper\AntiXSS();
48 48
 
49
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
50
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
51
-require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
49
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
50
+require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
51
+require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
52 52
 
53 53
 // init
54 54
 $ldap_suffix = '';
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 
58 58
 // If Debug then clean the files
59 59
 if (DEBUGLDAP === true) {
60
-    define('DEBUGLDAPFILE', $SETTINGS['path_to_files_folder'] . '/ldap.debug.txt');
60
+    define('DEBUGLDAPFILE', $SETTINGS['path_to_files_folder'].'/ldap.debug.txt');
61 61
     $fp = fopen(DEBUGLDAPFILE, 'w');
62 62
     fclose($fp);
63 63
 }
64 64
 if (DEBUGDUO === true) {
65
-    define('DEBUGDUOFILE', $SETTINGS['path_to_files_folder'] . '/duo.debug.txt');
65
+    define('DEBUGDUOFILE', $SETTINGS['path_to_files_folder'].'/duo.debug.txt');
66 66
     $fp = fopen(DEBUGDUOFILE, 'w');
67 67
     fclose($fp);
68 68
 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 if (defined('DB_PASSWD_CLEAR') === false) {
80 80
     define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
81 81
 }
82
-require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
82
+require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
83 83
 if (defined('DB_PASSWD_CLEAR') === false) {
84 84
     define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
85 85
 }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     // Get DUO keys
100 100
     $duoData = DB::query(
101 101
         'SELECT intitule, valeur
102
-        FROM ' . prefixTable('misc') . '
102
+        FROM ' . prefixTable('misc').'
103 103
         WHERE type = %s',
104 104
         'duoSecurity'
105 105
     );
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     }
109 109
 
110 110
     // load library
111
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/DuoSecurity/Duo.php';
111
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/DuoSecurity/Duo.php';
112 112
     $sig_request = Duo::signRequest(
113 113
         $_GLOBALS['IKEY'],
114 114
         $_GLOBALS['SKEY'],
@@ -120,17 +120,17 @@  discard block
 block discarded – undo
120 120
         debugIdentify(
121 121
             DEBUGDUO,
122 122
             DEBUGDUOFILE,
123
-            "\n\n-----\n\n" .
124
-                'sig request : ' . $post_login . "\n" .
125
-                'resp : ' . $sig_request . "\n"
123
+            "\n\n-----\n\n".
124
+                'sig request : '.$post_login."\n".
125
+                'resp : '.$sig_request."\n"
126 126
         );
127 127
     }
128 128
 
129 129
     // load csrfprotector
130
-    $csrfp_config = include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/csrfp/libs/csrfp.config.php';
130
+    $csrfp_config = include_once $SETTINGS['cpassman_dir'].'/includes/libraries/csrfp/libs/csrfp.config.php';
131 131
 
132 132
     // return result
133
-    echo '[{"sig_request" : "' . $sig_request . '" , "csrfp_token" : "' . $csrfp_config['CSRFP_TOKEN'] . '" , "csrfp_key" : "' . filter_var($_COOKIE[$csrfp_config['CSRFP_TOKEN']], FILTER_SANITIZE_STRING) . '"}]';
133
+    echo '[{"sig_request" : "'.$sig_request.'" , "csrfp_token" : "'.$csrfp_config['CSRFP_TOKEN'].'" , "csrfp_key" : "'.filter_var($_COOKIE[$csrfp_config['CSRFP_TOKEN']], FILTER_SANITIZE_STRING).'"}]';
134 134
     // ---
135 135
     // ---
136 136
 } elseif ($post_type === 'identify_duo_user_check') {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     //--------
141 141
 
142 142
     // load library
143
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/DuoSecurity/Duo.php';
143
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/DuoSecurity/Duo.php';
144 144
     $authenticated_username = Duo::verifyResponse(
145 145
         $SETTINGS['duo_ikey'],
146 146
         $SETTINGS['duo_skey'],
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
         debugIdentify(
153 153
             DEBUGDUO,
154 154
             DEBUGDUOFILE,
155
-            "\n\n-----\n\n" .
156
-                'sig response : ' . $post_sig_response . "\n" .
157
-                'resp : ' . $authenticated_username . "\n"
155
+            "\n\n-----\n\n".
156
+                'sig response : '.$post_sig_response."\n".
157
+                'resp : '.$authenticated_username."\n"
158 158
         );
159 159
     }
160 160
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             // is user in Teampass?
166 166
             $userInfo = DB::queryfirstrow(
167 167
                 'SELECT id
168
-                FROM ' . prefixTable('users') . '
168
+                FROM ' . prefixTable('users').'
169 169
                 WHERE login = %s',
170 170
                 $post_login
171 171
             );
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
             }
177 177
         }
178 178
 
179
-        echo '[{"authenticated_username" : "' . $authenticated_username . '"}]';
179
+        echo '[{"authenticated_username" : "'.$authenticated_username.'"}]';
180 180
     } else {
181
-        echo '[{"authenticated_username" : "' . $authenticated_username . '"}]';
181
+        echo '[{"authenticated_username" : "'.$authenticated_username.'"}]';
182 182
     }
183 183
     // ---
184 184
     // ---
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
 
191 191
     // Load superGlobals
192
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
192
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
193 193
     $superGlobal = new protect\SuperGlobal\SuperGlobal();
194 194
 
195 195
     // Prepare GET variables
@@ -282,19 +282,19 @@  discard block
 block discarded – undo
282 282
     } else {
283 283
         throw new Exception("Error file '/includes/config/tp.config.php' not exists", 1);
284 284
     }
285
-    include_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
285
+    include_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
286 286
 
287 287
     header('Content-type: text/html; charset=utf-8');
288 288
     error_reporting(E_ERROR);
289
-    include_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
290
-    include_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
289
+    include_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
290
+    include_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
291 291
 
292 292
     // Load AntiXSS
293
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/voku/helper/AntiXSS.php';
293
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/voku/helper/AntiXSS.php';
294 294
     $antiXss = new voku\helper\AntiXSS();
295 295
 
296 296
     // Load superGlobals
297
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
297
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
298 298
     $superGlobal = new protect\SuperGlobal\SuperGlobal();
299 299
 
300 300
     // Prepare GET variables
@@ -308,11 +308,11 @@  discard block
 block discarded – undo
308 308
     debugIdentify(
309 309
         DEBUGDUO,
310 310
         DEBUGDUOFILE,
311
-        "Content of data sent '" . filter_var($sentData, FILTER_SANITIZE_STRING) . "'\n"
311
+        "Content of data sent '".filter_var($sentData, FILTER_SANITIZE_STRING)."'\n"
312 312
     );
313 313
 
314 314
     // connect to the server
315
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
315
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
316 316
     if (defined('DB_PASSWD_CLEAR') === false) {
317 317
         define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
318 318
     }
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     DB::$encoding = DB_ENCODING;
325 325
 
326 326
     // User's language loading
327
-    include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $sessionUserLanguage . '.php';
327
+    include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$sessionUserLanguage.'.php';
328 328
     //echo $dataReceived." -->".empty($sessionKey)."<-- ".$sessionKey." ** " ;
329 329
     // decrypt and retreive data in JSON format
330 330
     if (empty($sessionKey) === true) {
@@ -404,14 +404,14 @@  discard block
 block discarded – undo
404 404
     debugIdentify(
405 405
         DEBUGDUO,
406 406
         DEBUGDUOFILE,
407
-        "Starting authentication of '" . $username . "'\n" .
408
-            'LDAP status: ' . $SETTINGS['ldap_mode'] . "\n"
407
+        "Starting authentication of '".$username."'\n".
408
+            'LDAP status: '.$SETTINGS['ldap_mode']."\n"
409 409
     );
410 410
 
411 411
     // Check if user exists
412 412
     $userInfo = DB::queryFirstRow(
413 413
         'SELECT *
414
-        FROM ' . prefixTable('users') . '
414
+        FROM ' . prefixTable('users').'
415 415
         WHERE login=%s',
416 416
         $username
417 417
     );
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
     debugIdentify(
438 438
         DEBUGDUO,
439 439
         DEBUGDUOFILE,
440
-        'USer exists: ' . $counter . "\n"
440
+        'USer exists: '.$counter."\n"
441 441
     );
442 442
 
443 443
     
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
     debugIdentify(
566 566
         DEBUGDUO,
567 567
         DEBUGDUOFILE,
568
-        'Proceed with Ident: ' . $proceedIdentification . "\n"
568
+        'Proceed with Ident: '.$proceedIdentification."\n"
569 569
     );
570 570
 
571 571
     // If admin user then check if folder install exists
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     debugIdentify(
607 607
         DEBUGDUO,
608 608
         DEBUGDUOFILE,
609
-        "User's password verified: " . /** @scrutinizer ignore-type */ $userPasswordVerified . "\n"
609
+        "User's password verified: "./** @scrutinizer ignore-type */ $userPasswordVerified."\n"
610 610
     );
611 611
 
612 612
     // Can connect if
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
         //$arrAttempts = array();
641 641
         $rows = DB::query(
642 642
             'SELECT date
643
-            FROM ' . prefixTable('log_system') . "
643
+            FROM ' . prefixTable('log_system')."
644 644
             WHERE field_1 = %s
645 645
             AND type = 'failed_auth'
646 646
             AND label = 'user_password_not_correct'
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             foreach ($rows as $record) {
657 657
                 array_push(
658 658
                     $arrAttempts,
659
-                    date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], $record['date'])
659
+                    date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], $record['date'])
660 660
                 );
661 661
             }
662 662
         }
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
         foreach ($superGlobal->get('user_roles', 'SESSION') as $role) {
797 797
             $resRoles = DB::queryFirstRow(
798 798
                 'SELECT title, complexity
799
-                FROM ' . prefixTable('roles_title') . '
799
+                FROM ' . prefixTable('roles_title').'
800 800
                 WHERE id=%i',
801 801
                 $role
802 802
             );
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 
818 818
         // build complete array of roles
819 819
         $superGlobal->put('arr_roles_full', array(), 'SESSION');
820
-        $rows = DB::query('SELECT id, title FROM ' . prefixTable('roles_title') . ' ORDER BY title ASC');
820
+        $rows = DB::query('SELECT id, title FROM '.prefixTable('roles_title').' ORDER BY title ASC');
821 821
         foreach ($rows as $record) {
822 822
             $superGlobal->put(
823 823
                 $record['id'],
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
             if (!empty($item)) {
912 912
                 $dataLastItems = DB::queryFirstRow(
913 913
                     'SELECT id,label,id_tree
914
-                    FROM ' . prefixTable('items') . '
914
+                    FROM ' . prefixTable('items').'
915 915
                     WHERE id=%i',
916 916
                     $item
917 917
                 );
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
                     array(
921 921
                         'id' => $item,
922 922
                         'label' => $dataLastItems['label'],
923
-                        'url' => 'index.php?page=items&amp;group=' . $dataLastItems['id_tree'] . '&amp;id=' . $item,
923
+                        'url' => 'index.php?page=items&amp;group='.$dataLastItems['id_tree'].'&amp;id='.$item,
924 924
                     ),
925 925
                     'SESSION',
926 926
                     'latest_items_tab'
@@ -937,12 +937,12 @@  discard block
 block discarded – undo
937 937
         ) {
938 938
             // get all Admin users
939 939
             $receivers = '';
940
-            $rows = DB::query('SELECT email FROM ' . prefixTable('users') . " WHERE admin = %i and email != ''", 1);
940
+            $rows = DB::query('SELECT email FROM '.prefixTable('users')." WHERE admin = %i and email != ''", 1);
941 941
             foreach ($rows as $record) {
942 942
                 if (empty($receivers)) {
943 943
                     $receivers = $record['email'];
944 944
                 } else {
945
-                    $receivers = ',' . $record['email'];
945
+                    $receivers = ','.$record['email'];
946 946
                 }
947 947
             }
948 948
             // Add email to table
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
                             '#tp_time#',
959 959
                         ),
960 960
                         array(
961
-                            ' ' . $superGlobal->get('login', 'SESSION') . ' (IP: ' . getClientIpServer() . ')',
961
+                            ' '.$superGlobal->get('login', 'SESSION').' (IP: '.getClientIpServer().')',
962 962
                             date($SETTINGS['date_format'], $superGlobal->get('last_connection', 'SESSION')),
963 963
                             date($SETTINGS['time_format'], $superGlobal->get('last_connection', 'SESSION')),
964 964
                         ),
@@ -1107,8 +1107,8 @@  discard block
 block discarded – undo
1107 1107
     debugIdentify(
1108 1108
         DEBUGDUO,
1109 1109
         DEBUGDUOFILE,
1110
-        "\n\n----\n" .
1111
-            'Identified : ' . filter_var($return, FILTER_SANITIZE_STRING) . "\n\n"
1110
+        "\n\n----\n".
1111
+            'Identified : '.filter_var($return, FILTER_SANITIZE_STRING)."\n\n"
1112 1112
     );
1113 1113
 
1114 1114
     echo prepareExchangedData(
@@ -1174,18 +1174,18 @@  discard block
 block discarded – undo
1174 1174
     ];
1175 1175
     
1176 1176
     // Load expected libraries
1177
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/illuminate/Contracts/Auth/Authenticatable.php';
1178
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/Traits/EnumeratesValues.php';
1179
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/Traits/Macroable.php';
1180
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/helpers.php';
1181
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/Arr.php';
1182
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Contracts/Support/Jsonable.php';
1183
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Contracts/Support/Arrayable.php';
1184
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/Enumerable.php';
1185
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Tightenco/Collect/Support/Collection.php';
1186
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/LdapRecord/DetectsErrors.php';
1187
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/LdapRecord/Connection.php';
1188
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/LdapRecord/Ldap.php';
1177
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/illuminate/Contracts/Auth/Authenticatable.php';
1178
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/Traits/EnumeratesValues.php';
1179
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/Traits/Macroable.php';
1180
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/helpers.php';
1181
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/Arr.php';
1182
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Contracts/Support/Jsonable.php';
1183
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Contracts/Support/Arrayable.php';
1184
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/Enumerable.php';
1185
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Tightenco/Collect/Support/Collection.php';
1186
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/LdapRecord/DetectsErrors.php';
1187
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/LdapRecord/Connection.php';
1188
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/LdapRecord/Ldap.php';
1189 1189
 
1190 1190
     $ad = new SplClassLoader('LdapRecord', '../includes/libraries');
1191 1191
     $ad->register();
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
 
1201 1201
         return array(
1202 1202
             'error' => true,
1203
-            'message' => langHdl('error').' : '.$error->getErrorCode()." - ".$error->getErrorMessage(). "<br>".$error->getDiagnosticMessage()." ".$config['username'],
1203
+            'message' => langHdl('error').' : '.$error->getErrorCode()." - ".$error->getErrorMessage()."<br>".$error->getDiagnosticMessage()." ".$config['username'],
1204 1204
              
1205 1205
         );
1206 1206
     }
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
         // Get immediate groups the user is apart of:
1231 1231
         $arrayTmp = array();
1232 1232
         foreach ($entry['memberof'] as $group) {
1233
-            $group = substr($group, strpos($group, '=')+1, (strpos($group,',') - strpos($group, '=') - 1));
1233
+            $group = substr($group, strpos($group, '=') + 1, (strpos($group, ',') - strpos($group, '=') - 1));
1234 1234
             if (empty($group) === false) {
1235 1235
                 array_push($arrayTmp, $group);
1236 1236
             }
@@ -1245,7 +1245,7 @@  discard block
 block discarded – undo
1245 1245
     }
1246 1246
 
1247 1247
     // load passwordLib library
1248
-    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
1248
+    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
1249 1249
     $pwdlib->register();
1250 1250
     $pwdlib = new PasswordLib\PasswordLib();
1251 1251
     $hashedPassword = $pwdlib->createPasswordHash($passwordClear);
@@ -1298,7 +1298,7 @@  discard block
 block discarded – undo
1298 1298
 function yubicoMFACheck($dataReceived, $userInfo, $SETTINGS)
1299 1299
 {
1300 1300
     // Load superGlobals
1301
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1301
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1302 1302
     $superGlobal = new protect\SuperGlobal\SuperGlobal();
1303 1303
     $sessionAdmin = $superGlobal->get('user_admin', 'SESSION');
1304 1304
     $sessionUrl = $superGlobal->get('initial_url', 'SESSION');
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
     }
1342 1342
 
1343 1343
     // Now check yubico validity
1344
-    include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/Yubico/Yubico.php';
1344
+    include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/Yubico/Yubico.php';
1345 1345
     $yubi = new Auth_Yubico($yubico_user_id, $yubico_user_key);
1346 1346
     $auth = $yubi->verify($yubico_key); //, null, null, null, 60
1347 1347
 
@@ -1396,7 +1396,7 @@  discard block
 block discarded – undo
1396 1396
             'gestionnaire' => '0',
1397 1397
             'can_manage_all_users' => '0',
1398 1398
             'personal_folder' => $SETTINGS['enable_pf_feature'] === '1' ? '1' : '0',
1399
-            'fonction_id' => (empty($retLDAP['user_info_from_ad'][0]['commonGroupsLdapVsTeampass']) === false ? $retLDAP['user_info_from_ad'][0]['commonGroupsLdapVsTeampass'] . ';' : '') . (isset($SETTINGS['ldap_new_user_role']) === true ? $SETTINGS['ldap_new_user_role'] : '0'),
1399
+            'fonction_id' => (empty($retLDAP['user_info_from_ad'][0]['commonGroupsLdapVsTeampass']) === false ? $retLDAP['user_info_from_ad'][0]['commonGroupsLdapVsTeampass'].';' : '').(isset($SETTINGS['ldap_new_user_role']) === true ? $SETTINGS['ldap_new_user_role'] : '0'),
1400 1400
             'groupes_interdits' => '',
1401 1401
             'groupes_visibles' => '',
1402 1402
             'last_pw_change' => time(),
@@ -1422,7 +1422,7 @@  discard block
 block discarded – undo
1422 1422
         );
1423 1423
 
1424 1424
         // Rebuild tree
1425
-        $tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'] . '/includes/libraries');
1425
+        $tree = new SplClassLoader('Tree\NestedTree', $SETTINGS['cpassman_dir'].'/includes/libraries');
1426 1426
         $tree->register();
1427 1427
         $tree = new Tree\NestedTree\NestedTree(prefixTable('nested_tree'), 'id', 'parent_id', 'title');
1428 1428
         $tree->rebuild();
@@ -1453,7 +1453,7 @@  discard block
 block discarded – undo
1453 1453
         && empty($dataReceived['GACode']) === false
1454 1454
     ) {
1455 1455
         // Load superGlobals
1456
-        include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1456
+        include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php';
1457 1457
         $superGlobal = new protect\SuperGlobal\SuperGlobal();
1458 1458
         $sessionAdmin = $superGlobal->get('user_admin', 'SESSION');
1459 1459
         $sessionUrl = $superGlobal->get('initial_url', 'SESSION');
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
         $proceedIdentification = false;
1464 1464
         
1465 1465
         // load library
1466
-        include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
1466
+        include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuth.php';
1467 1467
 
1468 1468
         // create new instance
1469 1469
         $tfa = new Authentication\TwoFactorAuth\TwoFactorAuth($SETTINGS['ga_website_name']);
@@ -1489,7 +1489,7 @@  discard block
 block discarded – undo
1489 1489
 
1490 1490
             // generate new QR
1491 1491
             $new_2fa_qr = $tfa->getQRCodeImageAsDataUri(
1492
-                'Teampass - ' . $username,
1492
+                'Teampass - '.$username,
1493 1493
                 $userInfo['ga']
1494 1494
             );
1495 1495
 
@@ -1504,7 +1504,7 @@  discard block
 block discarded – undo
1504 1504
             );
1505 1505
 
1506 1506
             $firstTime = array(
1507
-                'value' => '<img src="' . $new_2fa_qr . '">',
1507
+                'value' => '<img src="'.$new_2fa_qr.'">',
1508 1508
                 'user_admin' => isset($sessionAdmin) ? (int) $sessionAdmin : '',
1509 1509
                 'initial_url' => isset($sessionUrl) === true ? $sessionUrl : '',
1510 1510
                 'pwd_attempts' => (int) $sessionPwdAttempts,
@@ -1557,8 +1557,8 @@  discard block
 block discarded – undo
1557 1557
     $userPasswordVerified = false;
1558 1558
 
1559 1559
     // load passwordLib library
1560
-    include_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
1561
-    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'] . '/includes/libraries');
1560
+    include_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
1561
+    $pwdlib = new SplClassLoader('PasswordLib', $SETTINGS['cpassman_dir'].'/includes/libraries');
1562 1562
     $pwdlib->register();
1563 1563
     $pwdlib = new PasswordLib\PasswordLib();
1564 1564
 
Please login to merge, or discard this patch.