Fix: Firstname/Lastname lost
Conflicts: htdocs/admin/tools/update.php
This commit is contained in:
parent
74887b5850
commit
69b429914f
@ -160,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$nuser = new User($db);
|
$nuser = new User($db);
|
||||||
$result=$nuser->create_from_member($object,GETPOST('login','alpha'));
|
$result=$nuser->create_from_member($object,GETPOST('login'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -181,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
$result=$company->create_from_member($object,GETPOST('companyname','alpha'));
|
$result=$company->create_from_member($object,GETPOST('companyname'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -33,9 +33,7 @@ if ($_GET["msg"]) $message='<div class="error">'.$_GET["msg"].'</div>';
|
|||||||
|
|
||||||
|
|
||||||
$urldolibarr='http://www.dolibarr.org/downloads/';
|
$urldolibarr='http://www.dolibarr.org/downloads/';
|
||||||
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
|
|
||||||
$urldolibarrmodules='http://www.dolistore.com/';
|
$urldolibarrmodules='http://www.dolistore.com/';
|
||||||
//$urldolibarrthemes='http://www.dolibarr.org/';
|
|
||||||
$urldolibarrthemes='http://www.dolistore.com/';
|
$urldolibarrthemes='http://www.dolistore.com/';
|
||||||
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
||||||
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
||||||
@ -141,4 +139,4 @@ print $langs->trans("SetupIsReadyForUse").'<br>';
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -938,12 +938,12 @@ class User extends CommonObject
|
|||||||
|
|
||||||
// Positionne parametres
|
// Positionne parametres
|
||||||
$this->admin = 0;
|
$this->admin = 0;
|
||||||
$this->nom = $member->nom;
|
$this->lastname = $member->lastname;
|
||||||
$this->prenom = $member->prenom;
|
$this->firstname = $member->firstname;
|
||||||
$this->email = $member->email;
|
$this->email = $member->email;
|
||||||
$this->pass = $member->pass;
|
$this->pass = $member->pass;
|
||||||
|
|
||||||
if (empty($login)) $login=strtolower(substr($member->prenom, 0, 4)) . strtolower(substr($member->nom, 0, 4));
|
if (empty($login)) $login=strtolower(substr($member->firstname, 0, 4)) . strtolower(substr($member->lastname, 0, 4));
|
||||||
$this->login = $login;
|
$this->login = $login;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -1047,8 +1047,8 @@ class User extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
|
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->nom = trim($this->nom); // TODO deprecated
|
$this->nom = trim($this->nom); // deprecated
|
||||||
$this->prenom = trim($this->prenom); // TODO deprecated
|
$this->prenom = trim($this->prenom); // deprecated
|
||||||
$this->lastname = trim($this->lastname);
|
$this->lastname = trim($this->lastname);
|
||||||
$this->firstname = trim($this->firstname);
|
$this->firstname = trim($this->firstname);
|
||||||
$this->login = trim($this->login);
|
$this->login = trim($this->login);
|
||||||
@ -1142,8 +1142,10 @@ class User extends CommonObject
|
|||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$adh->prenom=$this->firstname;
|
$adh->prenom=$this->firstname; // deprecated
|
||||||
$adh->nom=$this->lastname;
|
$adh->nom=$this->lastname; // deprecated
|
||||||
|
$adh->firstname=$this->firstname;
|
||||||
|
$adh->lastname=$this->lastname;
|
||||||
$adh->login=$this->login;
|
$adh->login=$this->login;
|
||||||
$adh->pass=$this->pass;
|
$adh->pass=$this->pass;
|
||||||
$adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe);
|
$adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user