Passed
Push — master ( 8f7a8e...7e4a07 )
by Alxarafe
20:11
created
dolibarr/htdocs/user/card.php 1 patch
Spacing   +334 added lines, -334 removed lines patch added patch discarded remove patch
@@ -36,25 +36,25 @@  discard block
 block discarded – undo
36 36
  *       \file       htdocs/user/card.php
37 37
  *       \brief      Tab of user card
38 38
  */
39
-require DOL_BASE_PATH . '/main.inc.php';
40
-
41
-require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
42
-require_once DOL_DOCUMENT_ROOT . '/user/class/usergroup.class.php';
43
-require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
44
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
45
-require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
46
-require_once DOL_DOCUMENT_ROOT . '/core/lib/usergroups.lib.php';
47
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
48
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
49
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
39
+require DOL_BASE_PATH.'/main.inc.php';
40
+
41
+require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
42
+require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
43
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
44
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
45
+require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
46
+require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
47
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
50 50
 if (!empty($conf->ldap->enabled)) {
51
-    require_once DOL_DOCUMENT_ROOT . '/core/class/ldap.class.php';
51
+    require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
52 52
 }
53 53
 if (!empty($conf->adherent->enabled)) {
54
-    require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
54
+    require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
55 55
 }
56 56
 if (!empty($conf->categorie->enabled)) {
57
-    require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
57
+    require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
58 58
 }
59 59
 
60 60
 $id = GETPOST('id', 'int');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $subaction = GETPOST('subaction', 'alpha');
65 65
 $group = GETPOST("group", "int", 3);
66 66
 $cancel = GETPOST('cancel', 'alpha');
67
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'useracard';   // To manage different context of search
67
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'useracard'; // To manage different context of search
68 68
 // Define value to know what current user can do on users
69 69
 $canadduser = (!empty($user->admin) || $user->rights->user->user->creer);
70 70
 $canreaduser = (!empty($user->admin) || $user->rights->user->user->lire);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
  * Actions
118 118
  */
119 119
 $parameters = array('id' => $id, 'socid' => $socid, 'group' => $group, 'caneditgroup' => $caneditgroup);
120
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);    // Note that $action and $object may have been modified by some hooks
120
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
121 121
 if ($reshook < 0) {
122 122
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
123 123
 }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         if ($id <> $user->id) {
129 129
             $object->fetch($id);
130 130
             $object->setstatus(0);
131
-            header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $id);
131
+            header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id);
132 132
             exit;
133 133
         }
134 134
     }
@@ -141,14 +141,14 @@  discard block
 block discarded – undo
141 141
             if (!empty($conf->file->main_limit_users)) {
142 142
                 $nb = $object->getNbOfUsers("active");
143 143
                 if ($nb >= $conf->file->main_limit_users) {
144
-                    $error ++;
144
+                    $error++;
145 145
                     setEventMessages($langs->trans("YourQuotaOfUsersIsReached"), null, 'errors');
146 146
                 }
147 147
             }
148 148
 
149 149
             if (!$error) {
150 150
                 $object->setstatus(1);
151
-                header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $id);
151
+                header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id);
152 152
                 exit;
153 153
             }
154 154
         }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 $langs->load("errors");
164 164
                 setEventMessages($langs->trans("ErrorUserCannotBeDelete"), null, 'errors');
165 165
             } else {
166
-                header("Location: " . BASE_URI . "?controller=user&method=list&restore_lastsearch_values=1");
166
+                header("Location: ".BASE_URI."?controller=user&method=list&restore_lastsearch_values=1");
167 167
                 exit;
168 168
             }
169 169
         }
@@ -174,22 +174,22 @@  discard block
 block discarded – undo
174 174
         $error = 0;
175 175
 
176 176
         if (!$_POST["lastname"]) {
177
-            $error ++;
177
+            $error++;
178 178
             setEventMessages($langs->trans("NameNotDefined"), null, 'errors');
179
-            $action = "create";       // Go back to create page
179
+            $action = "create"; // Go back to create page
180 180
         }
181 181
         if (!$_POST["login"]) {
182
-            $error ++;
182
+            $error++;
183 183
             setEventMessages($langs->trans("LoginNotDefined"), null, 'errors');
184
-            $action = "create";       // Go back to create page
184
+            $action = "create"; // Go back to create page
185 185
         }
186 186
 
187 187
         if (!empty($conf->file->main_limit_users)) { // If option to limit users is set
188 188
             $nb = $object->getNbOfUsers("active");
189 189
             if ($nb >= $conf->file->main_limit_users) {
190
-                $error ++;
190
+                $error++;
191 191
                 setEventMessages($langs->trans("YourQuotaOfUsersIsReached"), null, 'errors');
192
-                $action = "create";       // Go back to create page
192
+                $action = "create"; // Go back to create page
193 193
             }
194 194
         }
195 195
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             // Fill array 'array_options' with data from add form
239 239
             $ret = $extrafields->setOptionalsFromPost($extralabels, $object);
240 240
             if ($ret < 0) {
241
-                $error ++;
241
+                $error++;
242 242
             }
243 243
 
244 244
             // Set entity property
@@ -274,13 +274,13 @@  discard block
 block discarded – undo
274 274
                 }
275 275
                 $db->commit();
276 276
 
277
-                header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $id);
277
+                header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id);
278 278
                 exit;
279 279
             } else {
280 280
                 $langs->load("errors");
281 281
                 $db->rollback();
282 282
                 setEventMessages($object->error, $object->errors, 'errors');
283
-                $action = "create";       // Go back to create page
283
+                $action = "create"; // Go back to create page
284 284
             }
285 285
         }
286 286
     }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             }
302 302
 
303 303
             if ($result > 0) {
304
-                header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $id);
304
+                header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id);
305 305
                 exit;
306 306
             } else {
307 307
                 setEventMessages($object->error, $object->errors, 'errors');
@@ -310,20 +310,20 @@  discard block
 block discarded – undo
310 310
     }
311 311
 
312 312
     if ($action == 'update' && !$cancel) {
313
-        require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
313
+        require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
314 314
 
315 315
         if ($caneditfield) {    // Case we can edit all field
316 316
             $error = 0;
317 317
 
318 318
             if (!$_POST["lastname"]) {
319 319
                 setEventMessages($langs->trans("NameNotDefined"), null, 'errors');
320
-                $action = "edit";       // Go back to create page
321
-                $error ++;
320
+                $action = "edit"; // Go back to create page
321
+                $error++;
322 322
             }
323 323
             if (!$_POST["login"]) {
324 324
                 setEventMessages($langs->trans("LoginNotDefined"), null, 'errors');
325
-                $action = "edit";       // Go back to create page
326
-                $error ++;
325
+                $action = "edit"; // Go back to create page
326
+                $error++;
327 327
             }
328 328
 
329 329
             if (!$error) {
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                 $object->pass = GETPOST("password", 'none');
343 343
                 $object->api_key = (GETPOST("api_key", 'alpha')) ? GETPOST("api_key", 'alpha') : $object->api_key;
344 344
                 if (!empty($user->admin)) {
345
-                    $object->admin = GETPOST("admin");  // admin flag can only be set/unset by an admin user. A test is also done later when forging sql request
345
+                    $object->admin = GETPOST("admin"); // admin flag can only be set/unset by an admin user. A test is also done later when forging sql request
346 346
                 }
347 347
                 $object->address = GETPOST('address', 'alphanohtml');
348 348
                 $object->zip = GETPOST('zipcode', 'alpha');
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                 // Fill array 'array_options' with data from add form
391 391
                 $ret = $extrafields->setOptionalsFromPost($extralabels, $object);
392 392
                 if ($ret < 0) {
393
-                    $error ++;
393
+                    $error++;
394 394
                 }
395 395
 
396 396
                 if (GETPOST('deletephoto')) {
@@ -420,40 +420,40 @@  discard block
 block discarded – undo
420 420
                         $contact = new Contact($db);
421 421
                         $contact->fetch($contactid);
422 422
 
423
-                        $sql = "UPDATE " . MAIN_DB_PREFIX . "user";
424
-                        $sql .= " SET fk_socpeople=" . $db->escape($contactid);
423
+                        $sql = "UPDATE ".MAIN_DB_PREFIX."user";
424
+                        $sql .= " SET fk_socpeople=".$db->escape($contactid);
425 425
                         if (!empty($contact->socid)) {
426
-                            $sql .= ", fk_soc=" . $db->escape($contact->socid);
426
+                            $sql .= ", fk_soc=".$db->escape($contact->socid);
427 427
                         }
428
-                        $sql .= " WHERE rowid=" . $object->id;
428
+                        $sql .= " WHERE rowid=".$object->id;
429 429
                     } else {
430
-                        $sql = "UPDATE " . MAIN_DB_PREFIX . "user";
430
+                        $sql = "UPDATE ".MAIN_DB_PREFIX."user";
431 431
                         $sql .= " SET fk_socpeople=NULL, fk_soc=NULL";
432
-                        $sql .= " WHERE rowid=" . $object->id;
432
+                        $sql .= " WHERE rowid=".$object->id;
433 433
                     }
434 434
                     dol_syslog("usercard::update", LOG_DEBUG);
435 435
                     $resql = $db->query($sql);
436 436
                     if (!$resql) {
437
-                        $error ++;
437
+                        $error++;
438 438
                         setEventMessages($db->lasterror(), null, 'errors');
439 439
                     }
440 440
                 }
441 441
 
442 442
                 if (!$error && !count($object->errors)) {
443 443
                     if (GETPOST('deletephoto') && $object->photo) {
444
-                        $fileimg = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'user') . '/' . $object->id . '/logos/' . $object->photo;
445
-                        $dirthumbs = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'user') . '/' . $object->id . '/logos/thumbs';
444
+                        $fileimg = $conf->user->dir_output.'/'.get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/logos/'.$object->photo;
445
+                        $dirthumbs = $conf->user->dir_output.'/'.get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id.'/logos/thumbs';
446 446
                         dol_delete_file($fileimg);
447 447
                         dol_delete_dir_recursive($dirthumbs);
448 448
                     }
449 449
 
450 450
                     if (isset($_FILES['photo']['tmp_name']) && trim($_FILES['photo']['tmp_name'])) {
451
-                        $dir = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $object, 'user') . '/' . $object->id;
451
+                        $dir = $conf->user->dir_output.'/'.get_exdir(0, 0, 0, 0, $object, 'user').'/'.$object->id;
452 452
 
453 453
                         dol_mkdir($dir);
454 454
 
455 455
                         if (@is_dir($dir)) {
456
-                            $newfile = $dir . '/' . dol_sanitizeFileName($_FILES['photo']['name']);
456
+                            $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']);
457 457
                             $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']);
458 458
 
459 459
                             if (!$result > 0) {
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
                                 $object->addThumbs($newfile);
464 464
                             }
465 465
                         } else {
466
-                            $error ++;
466
+                            $error++;
467 467
                             $langs->load("errors");
468 468
                             setEventMessages($langs->trans("ErrorFailedToCreateDir", $dir), $mesgs, 'errors');
469 469
                         }
@@ -585,15 +585,15 @@  discard block
 block discarded – undo
585 585
 
586 586
     // Actions to send emails
587 587
     $trigger_name = 'USER_SENTBYMAIL';
588
-    $paramname = 'id';    // Name of param key to open the card
588
+    $paramname = 'id'; // Name of param key to open the card
589 589
     $mode = 'emailfromuser';
590
-    $trackid = 'use' . $id;
591
-    include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
590
+    $trackid = 'use'.$id;
591
+    include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
592 592
 
593 593
     // Actions to build doc
594 594
     $upload_dir = $conf->user->dir_output;
595 595
     $permissioncreate = $user->rights->user->user->creer;
596
-    include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
596
+    include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
597 597
 }
598 598
 
599 599
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 
618 618
     print load_fiche_titre($langs->trans("NewUser"));
619 619
 
620
-    print $langs->trans("CreateInternalUserDesc") . "<br>\n";
620
+    print $langs->trans("CreateInternalUserDesc")."<br>\n";
621 621
     print "<br>";
622 622
 
623 623
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
                     $label = '';
663 663
                     foreach ($required_fields as $value) {
664 664
                         if ($value) {
665
-                            $label .= $value . "=" . $ldapuser[$value] . " ";
665
+                            $label .= $value."=".$ldapuser[$value]." ";
666 666
                         }
667 667
                     }
668 668
                     $liste[$key] = $label;
@@ -678,8 +678,8 @@  discard block
 block discarded – undo
678 678
         print "\n\n<!-- Form liste LDAP debut -->\n";
679 679
 
680 680
         // print '<form name="add_user_ldap" action="' . $_SERVER["PHP_SELF"] . '" method="post">';
681
-        print '<form name="add_user_ldap" href="' . BASE_URI . '?controller=user&method=card" method="post">';
682
-        print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
681
+        print '<form name="add_user_ldap" href="'.BASE_URI.'?controller=user&method=card" method="post">';
682
+        print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
683 683
         print '<table width="100%" class="border"><tr>';
684 684
         print '<td width="160">';
685 685
         print $langs->trans("LDAPUsers");
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
             print ajax_combobox('users');
692 692
         }
693 693
         print '</td><td align="center">';
694
-        print '<input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Get')) . '"' . (count($liste) ? '' : ' disabled') . '>';
694
+        print '<input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans('Get')).'"'.(count($liste) ? '' : ' disabled').'>';
695 695
         print '</td></tr></table>';
696 696
         print '</form>';
697 697
 
@@ -701,13 +701,13 @@  discard block
 block discarded – undo
701 701
 
702 702
 
703 703
     // print '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST" name="createuser">';
704
-    print '<form href="' . BASE_URI . '?controller=user&method=card" method="POST" name="createuser">';
705
-    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
704
+    print '<form href="'.BASE_URI.'?controller=user&method=card" method="POST" name="createuser">';
705
+    print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
706 706
     print '<input type="hidden" name="action" value="add">';
707 707
     if (!empty($ldap_sid)) {
708
-        print '<input type="hidden" name="ldap_sid" value="' . dol_escape_htmltag($ldap_sid) . '">';
708
+        print '<input type="hidden" name="ldap_sid" value="'.dol_escape_htmltag($ldap_sid).'">';
709 709
     }
710
-    print '<input type="hidden" name="entity" value="' . $conf->entity . '">';
710
+    print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
711 711
 
712 712
     dol_fiche_head('', '', '', 0, '');
713 713
 
@@ -717,75 +717,75 @@  discard block
 block discarded – undo
717 717
 
718 718
     // Lastname
719 719
     print '<tr>';
720
-    print '<td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("Lastname") . '</span></td>';
720
+    print '<td class="titlefieldcreate"><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td>';
721 721
     print '<td>';
722 722
     if (!empty($ldap_lastname)) {
723
-        print '<input type="hidden" id="lastname" name="lastname" value="' . $ldap_lastname . '">';
723
+        print '<input type="hidden" id="lastname" name="lastname" value="'.$ldap_lastname.'">';
724 724
         print $ldap_lastname;
725 725
     } else {
726
-        print '<input class="minwidth100" type="text" id="lastname" name="lastname" value="' . GETPOST('lastname') . '">';
726
+        print '<input class="minwidth100" type="text" id="lastname" name="lastname" value="'.GETPOST('lastname').'">';
727 727
     }
728 728
     print '</td></tr>';
729 729
 
730 730
     // Firstname
731
-    print '<tr><td>' . $langs->trans("Firstname") . '</td>';
731
+    print '<tr><td>'.$langs->trans("Firstname").'</td>';
732 732
     print '<td>';
733 733
     if (!empty($ldap_firstname)) {
734
-        print '<input type="hidden" name="firstname" value="' . $ldap_firstname . '">';
734
+        print '<input type="hidden" name="firstname" value="'.$ldap_firstname.'">';
735 735
         print $ldap_firstname;
736 736
     } else {
737
-        print '<input class="minwidth100" type="text" name="firstname" value="' . GETPOST('firstname') . '">';
737
+        print '<input class="minwidth100" type="text" name="firstname" value="'.GETPOST('firstname').'">';
738 738
     }
739 739
     print '</td></tr>';
740 740
 
741 741
     // Login
742
-    print '<tr><td><span class="fieldrequired">' . $langs->trans("Login") . '</span></td>';
742
+    print '<tr><td><span class="fieldrequired">'.$langs->trans("Login").'</span></td>';
743 743
     print '<td>';
744 744
     if (!empty($ldap_login)) {
745
-        print '<input type="hidden" name="login" value="' . $ldap_login . '">';
745
+        print '<input type="hidden" name="login" value="'.$ldap_login.'">';
746 746
         print $ldap_login;
747 747
     } elseif (!empty($ldap_loginsmb)) {
748
-        print '<input type="hidden" name="login" value="' . $ldap_loginsmb . '">';
748
+        print '<input type="hidden" name="login" value="'.$ldap_loginsmb.'">';
749 749
         print $ldap_loginsmb;
750 750
     } else {
751
-        print '<input class="maxwidth200" maxsize="24" type="text" name="login" value="' . dol_escape_htmltag(GETPOST('login', 'alpha')) . '">';
751
+        print '<input class="maxwidth200" maxsize="24" type="text" name="login" value="'.dol_escape_htmltag(GETPOST('login', 'alpha')).'">';
752 752
     }
753 753
     print '</td></tr>';
754 754
 
755 755
     $generated_password = '';
756 756
     if (empty($ldap_sid)) {    // ldap_sid is for activedirectory
757
-        require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
757
+        require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
758 758
         $generated_password = getRandomPassword(false);
759 759
     }
760 760
     $password = $generated_password;
761 761
 
762 762
     // Password
763
-    print '<tr><td class="fieldrequired">' . $langs->trans("Password") . '</td>';
763
+    print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td>';
764 764
     print '<td>';
765 765
     $valuetoshow = '';
766 766
     if (preg_match('/ldap/', $dolibarr_main_authentication)) {
767
-        $valuetoshow .= ($valuetoshow ? ', ' : '') . $langs->trans("PasswordOfUserInLDAP");
767
+        $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("PasswordOfUserInLDAP");
768 768
     }
769 769
     if (preg_match('/http/', $dolibarr_main_authentication)) {
770
-        $valuetoshow .= ($valuetoshow ? ', ' : '') . $langs->trans("HTTPBasicPassword");
770
+        $valuetoshow .= ($valuetoshow ? ', ' : '').$langs->trans("HTTPBasicPassword");
771 771
     }
772 772
     if (preg_match('/dolibarr/', $dolibarr_main_authentication)) {
773 773
         if (!empty($ldap_pass)) { // For very old system comaptibilty. Now clear password can't be viewed from LDAP read
774
-            $valuetoshow .= ($valuetoshow ? ', ' : '') . '<input type="hidden" name="password" value="' . $ldap_pass . '">'; // Dolibarr password is preffiled with LDAP known password
774
+            $valuetoshow .= ($valuetoshow ? ', ' : '').'<input type="hidden" name="password" value="'.$ldap_pass.'">'; // Dolibarr password is preffiled with LDAP known password
775 775
             $valuetoshow .= preg_replace('/./i', '*', $ldap_pass);
776 776
         } else {
777 777
             // We do not use a field password but a field text to show new password to use.
778
-            $valuetoshow .= ($valuetoshow ? ', ' : '') . '<input size="30" maxsize="32" type="text" name="password" value="' . $password . '" autocomplete="new-password">';
778
+            $valuetoshow .= ($valuetoshow ? ', ' : '').'<input size="30" maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="new-password">';
779 779
         }
780 780
     }
781 781
 
782 782
     // Other form for user password
783 783
     $parameters = array('valuetoshow' => $valuetoshow, 'password' => $password);
784
-    $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
784
+    $reshook = $hookmanager->executeHooks('printUserPasswordField', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
785 785
     if ($reshook > 0) {
786 786
         $valuetoshow = $hookmanager->resPrint; // to replace
787 787
     } else {
788
-        $valuetoshow .= $hookmanager->resPrint;    // to add
788
+        $valuetoshow .= $hookmanager->resPrint; // to add
789 789
     }
790 790
     print $valuetoshow;
791 791
     print '</td></tr>';
@@ -793,25 +793,25 @@  discard block
 block discarded – undo
793 793
     if (!empty($conf->api->enabled)) {
794 794
         // API key
795 795
         $generated_api_key = '';
796
-        require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
796
+        require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
797 797
         $generated_password = getRandomPassword(false);
798
-        print '<tr><td>' . $langs->trans("ApiKey") . '</td>';
798
+        print '<tr><td>'.$langs->trans("ApiKey").'</td>';
799 799
         print '<td>';
800
-        print '<input size="30" maxsize="32" type="text" id="api_key" name="api_key" value="' . $api_key . '" autocomplete="off">';
800
+        print '<input size="30" maxsize="32" type="text" id="api_key" name="api_key" value="'.$api_key.'" autocomplete="off">';
801 801
         if (!empty($conf->use_javascript_ajax)) {
802
-            print '&nbsp;' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"');
802
+            print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_api_key" class="linkobject"');
803 803
         }
804 804
         print '</td></tr>';
805 805
     } else {
806
-        require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
806
+        require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
807 807
         // PARTIAL WORKAROUND
808 808
         $generated_fake_api_key = getRandomPassword(false);
809
-        print '<input type="hidden" name="api_key" value="' . $generated_fake_api_key . '">';
809
+        print '<input type="hidden" name="api_key" value="'.$generated_fake_api_key.'">';
810 810
     }
811 811
 
812 812
     // Administrator
813 813
     if (!empty($user->admin)) {
814
-        print '<tr><td>' . $langs->trans("Administrator") . '</td>';
814
+        print '<tr><td>'.$langs->trans("Administrator").'</td>';
815 815
         print '<td>';
816 816
         print $form->selectyesno('admin', GETPOST('admin'), 1);
817 817
 
@@ -845,19 +845,19 @@  discard block
 block discarded – undo
845 845
             }
846 846
             $checked = (GETPOST('superadmin', 'int') ? ' checked' : '');
847 847
             $disabled = (GETPOST('superadmin', 'int') ? '' : ' disabled');
848
-            print '<input type="checkbox" name="superadmin" value="1"' . $checked . $disabled . ' /> ' . $langs->trans("SuperAdministrator");
848
+            print '<input type="checkbox" name="superadmin" value="1"'.$checked.$disabled.' /> '.$langs->trans("SuperAdministrator");
849 849
         }
850 850
         print "</td></tr>\n";
851 851
     }
852 852
 
853 853
     // Type
854
-    print '<tr><td>' . $langs->trans("Type") . '</td>';
854
+    print '<tr><td>'.$langs->trans("Type").'</td>';
855 855
     print '<td>';
856 856
     print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2);
857 857
     print '</td></tr>';
858 858
 
859 859
     // Gender
860
-    print '<tr><td>' . $langs->trans("Gender") . '</td>';
860
+    print '<tr><td>'.$langs->trans("Gender").'</td>';
861 861
     print '<td>';
862 862
     $arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"));
863 863
     print $form->selectarray('gender', $arraygender, GETPOST('gender'), 1);
@@ -866,12 +866,12 @@  discard block
 block discarded – undo
866 866
     // Employee
867 867
     $defaultemployee = 1;
868 868
     print '<tr>';
869
-    print '<td>' . $langs->trans('Employee') . '</td><td>';
869
+    print '<td>'.$langs->trans('Employee').'</td><td>';
870 870
     print $form->selectyesno("employee", (GETPOST('employee') != '' ? GETPOST('employee') : $defaultemployee), 1);
871 871
     print '</td></tr>';
872 872
 
873 873
     // Hierarchy
874
-    print '<tr><td class="titlefieldcreate">' . $langs->trans("HierarchicalResponsible") . '</td>';
874
+    print '<tr><td class="titlefieldcreate">'.$langs->trans("HierarchicalResponsible").'</td>';
875 875
     print '<td>';
876 876
     print $form->select_dolusers($object->fk_user, 'fk_user', 1, array($object->id), 0, '', 0, $conf->entity, 0, 0, '', 0, '', 'maxwidth300');
877 877
     print '</td>';
@@ -882,23 +882,23 @@  discard block
 block discarded – undo
882 882
 
883 883
 
884 884
     // Address
885
-    print '<tr><td class="tdtop titlefieldcreate">' . $form->editfieldkey('Address', 'address', '', $object, 0) . '</td>';
885
+    print '<tr><td class="tdtop titlefieldcreate">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>';
886 886
     print '<td><textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">';
887 887
     print $object->address;
888 888
     print '</textarea></td></tr>';
889 889
 
890 890
     // Zip
891
-    print '<tr><td>' . $form->editfieldkey('Zip', 'zipcode', '', $object, 0) . '</td><td>';
891
+    print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
892 892
     print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6);
893 893
     print '</td></tr>';
894 894
 
895 895
     // Town
896
-    print '<tr><td>' . $form->editfieldkey('Town', 'town', '', $object, 0) . '</td><td>';
896
+    print '<tr><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
897 897
     print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
898 898
     print '</td></tr>';
899 899
 
900 900
     // Country
901
-    print '<tr><td>' . $form->editfieldkey('Country', 'selectcountry_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">';
901
+    print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
902 902
     print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id));
903 903
     if ($user->admin) {
904 904
         print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
@@ -907,105 +907,105 @@  discard block
 block discarded – undo
907 907
 
908 908
     // State
909 909
     if (empty($conf->global->USER_DISABLE_STATE)) {
910
-        print '<tr><td>' . $form->editfieldkey('State', 'state_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">';
910
+        print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
911 911
         print $formcompany->select_state($object->state_id, $object->country_code, 'state_id');
912 912
         print '</td></tr>';
913 913
     }
914 914
 
915 915
     // Tel
916
-    print '<tr><td>' . $langs->trans("PhonePro") . '</td>';
916
+    print '<tr><td>'.$langs->trans("PhonePro").'</td>';
917 917
     print '<td>';
918 918
     if (!empty($ldap_phone)) {
919
-        print '<input type="hidden" name="office_phone" value="' . $ldap_phone . '">';
919
+        print '<input type="hidden" name="office_phone" value="'.$ldap_phone.'">';
920 920
         print $ldap_phone;
921 921
     } else {
922
-        print '<input size="20" type="text" name="office_phone" value="' . GETPOST('office_phone') . '">';
922
+        print '<input size="20" type="text" name="office_phone" value="'.GETPOST('office_phone').'">';
923 923
     }
924 924
     print '</td></tr>';
925 925
 
926 926
     // Tel portable
927
-    print '<tr><td>' . $langs->trans("PhoneMobile") . '</td>';
927
+    print '<tr><td>'.$langs->trans("PhoneMobile").'</td>';
928 928
     print '<td>';
929 929
     if (!empty($ldap_mobile)) {
930
-        print '<input type="hidden" name="user_mobile" value="' . $ldap_mobile . '">';
930
+        print '<input type="hidden" name="user_mobile" value="'.$ldap_mobile.'">';
931 931
         print $ldap_mobile;
932 932
     } else {
933
-        print '<input size="20" type="text" name="user_mobile" value="' . GETPOST('user_mobile') . '">';
933
+        print '<input size="20" type="text" name="user_mobile" value="'.GETPOST('user_mobile').'">';
934 934
     }
935 935
     print '</td></tr>';
936 936
 
937 937
     // Fax
938
-    print '<tr><td>' . $langs->trans("Fax") . '</td>';
938
+    print '<tr><td>'.$langs->trans("Fax").'</td>';
939 939
     print '<td>';
940 940
     if (!empty($ldap_fax)) {
941
-        print '<input type="hidden" name="office_fax" value="' . $ldap_fax . '">';
941
+        print '<input type="hidden" name="office_fax" value="'.$ldap_fax.'">';
942 942
         print $ldap_fax;
943 943
     } else {
944
-        print '<input size="20" type="text" name="office_fax" value="' . GETPOST('office_fax') . '">';
944
+        print '<input size="20" type="text" name="office_fax" value="'.GETPOST('office_fax').'">';
945 945
     }
946 946
     print '</td></tr>';
947 947
 
948 948
     // Skype
949 949
     if (!empty($conf->socialnetworks->enabled)) {
950
-        print '<tr><td>' . $langs->trans("Skype") . '</td>';
950
+        print '<tr><td>'.$langs->trans("Skype").'</td>';
951 951
         print '<td>';
952 952
         if (!empty($ldap_skype)) {
953
-            print '<input type="hidden" name="skype" value="' . $ldap_skype . '">';
953
+            print '<input type="hidden" name="skype" value="'.$ldap_skype.'">';
954 954
             print $ldap_skype;
955 955
         } else {
956
-            print '<input class="maxwidth200" type="text" name="skype" value="' . GETPOST('skype', 'alpha') . '">';
956
+            print '<input class="maxwidth200" type="text" name="skype" value="'.GETPOST('skype', 'alpha').'">';
957 957
         }
958 958
         print '</td></tr>';
959 959
     }
960 960
 
961 961
     // Twitter
962 962
     if (!empty($conf->socialnetworks->enabled)) {
963
-        print '<tr><td>' . $langs->trans("Twitter") . '</td>';
963
+        print '<tr><td>'.$langs->trans("Twitter").'</td>';
964 964
         print '<td>';
965 965
         if (!empty($ldap_twitter)) {
966
-            print '<input type="hidden" name="twitter" value="' . $ldap_twitter . '">';
966
+            print '<input type="hidden" name="twitter" value="'.$ldap_twitter.'">';
967 967
             print $ldap_twitter;
968 968
         } else {
969
-            print '<input class="maxwidth200" type="text" name="twitter" value="' . GETPOST('twitter', 'alpha') . '">';
969
+            print '<input class="maxwidth200" type="text" name="twitter" value="'.GETPOST('twitter', 'alpha').'">';
970 970
         }
971 971
         print '</td></tr>';
972 972
     }
973 973
 
974 974
     // Facebook
975 975
     if (!empty($conf->socialnetworks->enabled)) {
976
-        print '<tr><td>' . $langs->trans("Facebook") . '</td>';
976
+        print '<tr><td>'.$langs->trans("Facebook").'</td>';
977 977
         print '<td>';
978 978
         if (!empty($ldap_facebook)) {
979
-            print '<input type="hidden" name="facebook" value="' . $ldap_facebook . '">';
979
+            print '<input type="hidden" name="facebook" value="'.$ldap_facebook.'">';
980 980
             print $ldap_facebook;
981 981
         } else {
982
-            print '<input class="maxwidth200" type="text" name="facebook" value="' . GETPOST('facebook', 'alpha') . '">';
982
+            print '<input class="maxwidth200" type="text" name="facebook" value="'.GETPOST('facebook', 'alpha').'">';
983 983
         }
984 984
         print '</td></tr>';
985 985
     }
986 986
 
987 987
     // EMail
988
-    print '<tr><td' . (!empty($conf->global->USER_MAIL_REQUIRED) ? ' class="fieldrequired"' : '') . '>' . $langs->trans("EMail") . '</td>';
988
+    print '<tr><td'.(!empty($conf->global->USER_MAIL_REQUIRED) ? ' class="fieldrequired"' : '').'>'.$langs->trans("EMail").'</td>';
989 989
     print '<td>';
990 990
     if (!empty($ldap_mail)) {
991
-        print '<input type="hidden" name="email" value="' . $ldap_mail . '">';
991
+        print '<input type="hidden" name="email" value="'.$ldap_mail.'">';
992 992
         print $ldap_mail;
993 993
     } else {
994
-        print '<input size="40" type="text" name="email" value="' . GETPOST('email') . '">';
994
+        print '<input size="40" type="text" name="email" value="'.GETPOST('email').'">';
995 995
     }
996 996
     print '</td></tr>';
997 997
 
998 998
     // Accountancy code
999 999
     if ($conf->accounting->enabled) {
1000
-        print '<tr><td>' . $langs->trans("AccountancyCode") . '</td>';
1000
+        print '<tr><td>'.$langs->trans("AccountancyCode").'</td>';
1001 1001
         print '<td>';
1002
-        print '<input size="30" type="text" name="accountancy_code" value="' . GETPOST('accountancy_code') . '">';
1002
+        print '<input size="30" type="text" name="accountancy_code" value="'.GETPOST('accountancy_code').'">';
1003 1003
         print '</td></tr>';
1004 1004
     }
1005 1005
 
1006 1006
     // User color
1007 1007
     if (!empty($conf->agenda->enabled)) {
1008
-        print '<tr><td>' . $langs->trans("ColorUser") . '</td>';
1008
+        print '<tr><td>'.$langs->trans("ColorUser").'</td>';
1009 1009
         print '<td>';
1010 1010
         print $formother->selectColor(GETPOST('color') ? GETPOST('color') : $object->color, 'color', null, 1, '', 'hideifnotset');
1011 1011
         print '</td></tr>';
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 
1014 1014
     // Categories
1015 1015
     if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) {
1016
-        print '<tr><td>' . $form->editfieldkey('Categories', 'usercats', '', $object, 0) . '</td><td colspan="3">';
1016
+        print '<tr><td>'.$form->editfieldkey('Categories', 'usercats', '', $object, 0).'</td><td colspan="3">';
1017 1017
         $cate_arbo = $form->select_all_categories('user', null, 'parent', null, null, 1);
1018 1018
         print $form->multiselectarray('usercats', $cate_arbo, GETPOST('usercats', 'array'), null, null, null, null, '90%');
1019 1019
         print "</td></tr>";
@@ -1024,18 +1024,18 @@  discard block
 block discarded – undo
1024 1024
         // This is now done with hook formObjectOptions. Keep this code for backward compatibility with old multicompany module
1025 1025
         if (!method_exists($mc, 'formObjectOptions')) {
1026 1026
             if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1 && $user->admin && !$user->entity) { // condition must be same for create and edit mode
1027
-                print "<tr>" . '<td>' . $langs->trans("Entity") . '</td>';
1028
-                print "<td>" . $mc->select_entities($conf->entity);
1027
+                print "<tr>".'<td>'.$langs->trans("Entity").'</td>';
1028
+                print "<td>".$mc->select_entities($conf->entity);
1029 1029
                 print "</td></tr>\n";
1030 1030
             } else {
1031
-                print '<input type="hidden" name="entity" value="' . $conf->entity . '" />';
1031
+                print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
1032 1032
             }
1033 1033
         }
1034 1034
     }
1035 1035
 
1036 1036
     // Other attributes
1037 1037
     $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"');
1038
-    $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
1038
+    $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1039 1039
     print $hookmanager->resPrint;
1040 1040
     if (empty($reshook)) {
1041 1041
         print $object->showOptionals($extrafields, 'edit');
@@ -1045,15 +1045,15 @@  discard block
 block discarded – undo
1045 1045
     print '<tr><td class="tdtop">';
1046 1046
     print $langs->trans("Note");
1047 1047
     print '</td><td>';
1048
-    require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
1048
+    require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
1049 1049
     $doleditor = new DolEditor('note', '', '', 120, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
1050 1050
     $doleditor->Create();
1051 1051
     print "</td></tr>\n";
1052 1052
 
1053 1053
     // Signature
1054
-    print '<tr><td class="tdtop">' . $langs->trans("Signature") . '</td>';
1054
+    print '<tr><td class="tdtop">'.$langs->trans("Signature").'</td>';
1055 1055
     print '<td>';
1056
-    require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
1056
+    require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
1057 1057
     $doleditor = new DolEditor('signature', GETPOST('signature'), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%');
1058 1058
     print $doleditor->Create(1);
1059 1059
     print '</td></tr>';
@@ -1064,9 +1064,9 @@  discard block
 block discarded – undo
1064 1064
 
1065 1065
     // TODO Move this into tab RH (HierarchicalResponsible must be on both tab)
1066 1066
     // Position/Job
1067
-    print '<tr><td class="titlefieldcreate">' . $langs->trans("PostOrFunction") . '</td>';
1067
+    print '<tr><td class="titlefieldcreate">'.$langs->trans("PostOrFunction").'</td>';
1068 1068
     print '<td>';
1069
-    print '<input class="maxwidth200" type="text" name="job" value="' . GETPOST('job') . '">';
1069
+    print '<input class="maxwidth200" type="text" name="job" value="'.GETPOST('job').'">';
1070 1070
     print '</td></tr>';
1071 1071
 
1072 1072
 
@@ -1079,7 +1079,7 @@  discard block
 block discarded – undo
1079 1079
         print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
1080 1080
         print '</td>';
1081 1081
         print '<td>';
1082
-        print '<input size="8" type="text" name="thm" value="' . GETPOST('thm') . '">';
1082
+        print '<input size="8" type="text" name="thm" value="'.GETPOST('thm').'">';
1083 1083
         print '</td>';
1084 1084
         print "</tr>\n";
1085 1085
 
@@ -1089,41 +1089,41 @@  discard block
 block discarded – undo
1089 1089
         print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
1090 1090
         print '</td>';
1091 1091
         print '<td>';
1092
-        print '<input size="8" type="text" name="tjm" value="' . GETPOST('tjm') . '">';
1092
+        print '<input size="8" type="text" name="tjm" value="'.GETPOST('tjm').'">';
1093 1093
         print '</td>';
1094 1094
         print "</tr>\n";
1095 1095
 
1096 1096
         // Salary
1097
-        print '<tr><td>' . $langs->trans("Salary") . '</td>';
1097
+        print '<tr><td>'.$langs->trans("Salary").'</td>';
1098 1098
         print '<td>';
1099
-        print '<input size="8" type="text" name="salary" value="' . GETPOST('salary') . '">';
1099
+        print '<input size="8" type="text" name="salary" value="'.GETPOST('salary').'">';
1100 1100
         print '</td>';
1101 1101
         print "</tr>\n";
1102 1102
     }
1103 1103
 
1104 1104
     // Weeklyhours
1105
-    print '<tr><td>' . $langs->trans("WeeklyHours") . '</td>';
1105
+    print '<tr><td>'.$langs->trans("WeeklyHours").'</td>';
1106 1106
     print '<td>';
1107
-    print '<input size="8" type="text" name="weeklyhours" value="' . GETPOST('weeklyhours') . '">';
1107
+    print '<input size="8" type="text" name="weeklyhours" value="'.GETPOST('weeklyhours').'">';
1108 1108
     print '</td>';
1109 1109
     print "</tr>\n";
1110 1110
 
1111 1111
     // Date employment
1112
-    print '<tr><td>' . $langs->trans("DateEmployment") . '</td>';
1112
+    print '<tr><td>'.$langs->trans("DateEmployment").'</td>';
1113 1113
     print '<td>';
1114 1114
     print $form->selectDate(GETPOST('dateemployment'), 'dateemployment', 0, 0, 1, 'formdateemployment', 1, 0);
1115 1115
     print '</td>';
1116 1116
     print "</tr>\n";
1117 1117
 
1118 1118
     // Date employment END
1119
-    print '<tr><td>' . $langs->trans("DateEmploymentEnd") . '</td>';
1119
+    print '<tr><td>'.$langs->trans("DateEmploymentEnd").'</td>';
1120 1120
     print '<td>';
1121 1121
     print $form->selectDate(GETPOST('dateemploymentend'), 'dateemploymentend', 0, 0, 1, 'formdateemploymentend', 1, 0);
1122 1122
     print '</td>';
1123 1123
     print "</tr>\n";
1124 1124
 
1125 1125
     // Date birth
1126
-    print '<tr><td>' . $langs->trans("DateToBirth") . '</td>';
1126
+    print '<tr><td>'.$langs->trans("DateToBirth").'</td>';
1127 1127
     print '<td>';
1128 1128
     print $form->selectDate(GETPOST('birth'), 'birth', 0, 0, 1, 'createuser', 1, 0);
1129 1129
     print '</td>';
@@ -1134,7 +1134,7 @@  discard block
 block discarded – undo
1134 1134
     dol_fiche_end();
1135 1135
 
1136 1136
     print '<div align="center">';
1137
-    print '<input class="button" value="' . $langs->trans("CreateUser") . '" name="create" type="submit">';
1137
+    print '<input class="button" value="'.$langs->trans("CreateUser").'" name="create" type="submit">';
1138 1138
     //print '&nbsp; &nbsp; &nbsp;';
1139 1139
     //print '<input value="'.$langs->trans("Cancel").'" class="button" type="submit" name="cancel">';
1140 1140
     print '</div>';
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
             $ldap = new Ldap();
1170 1170
             $result = $ldap->connect_bind();
1171 1171
             if ($result > 0) {
1172
-                $userSearchFilter = '(' . $conf->global->LDAP_FILTER_CONNECTION . '(' . $ldap->getUserIdentifier() . '=' . $object->login . '))';
1172
+                $userSearchFilter = '('.$conf->global->LDAP_FILTER_CONNECTION.'('.$ldap->getUserIdentifier().'='.$object->login.'))';
1173 1173
                 $entries = $ldap->fetch($object->login, $userSearchFilter);
1174 1174
                 if (!$entries) {
1175 1175
                     setEventMessages($ldap->error, $ldap->errors, 'errors');
@@ -1202,13 +1202,13 @@  discard block
 block discarded – undo
1202 1202
         // Show tabs
1203 1203
         if ($mode == 'employee') { // For HRM module development
1204 1204
             $title = $langs->trans("Employee");
1205
-            $linkback = '<a href="' . BASE_URI . '?controller=hrm/employee&method=list&restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>';
1205
+            $linkback = '<a href="'.BASE_URI.'?controller=hrm/employee&method=list&restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
1206 1206
         } else {
1207 1207
             $title = $langs->trans("User");
1208 1208
             $linkback = '';
1209 1209
 
1210 1210
             if ($user->rights->user->user->lire || $user->admin) {
1211