Fix phpcs

This commit is contained in:
Laurent Destailleur 2021-07-20 23:03:19 +02:00
parent b57eb8284e
commit e25171b9f5
3 changed files with 8 additions and 8 deletions

View File

@ -559,7 +559,7 @@ if (!empty($force_install_noedit)) {
class="needroot text-security"
value="<?php
// If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
$autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
$autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
if (!empty($dolibarr_main_prod)) {
$autofill = '';
}

View File

@ -315,7 +315,7 @@ if (empty($reshook)) {
$id = $object->create($user);
if ($id > 0) {
if (GETPOST('password', 'none')) {
$object->setPassword($user, GETPOST('password','none'));
$object->setPassword($user, GETPOST('password', 'none'));
}
if (!empty($conf->categorie->enabled)) {
// Categories association

View File

@ -1281,9 +1281,9 @@ class User extends CommonObject
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login"));
return -1;
} elseif (preg_match('/[,@<>"\']/', $this->login)) {
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
return -1;
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
return -1;
}
$this->datec = dol_now();
@ -1674,9 +1674,9 @@ class User extends CommonObject
$this->error = $langs->trans("ErrorFieldRequired", 'Login');
return -1;
} elseif (preg_match('/[,@<>"\']/', $this->login)) {
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
return -1;
$langs->load("errors");
$this->error = $langs->trans("ErrorBadCharIntoLoginName");
return -1;
}
$this->db->begin();