Fix: Firstname/Lastname lost
This commit is contained in:
parent
d804683b32
commit
8898b9a3b0
@ -160,7 +160,7 @@ if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user
|
||||
{
|
||||
// Creation user
|
||||
$nuser = new User($db);
|
||||
$result=$nuser->create_from_member($object,GETPOST('login','alpha'));
|
||||
$result=$nuser->create_from_member($object,GETPOST('login'));
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
@ -181,7 +181,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
||||
{
|
||||
// Creation user
|
||||
$company = new Societe($db);
|
||||
$result=$company->create_from_member($object,GETPOST('companyname','alpha'));
|
||||
$result=$company->create_from_member($object,GETPOST('companyname'));
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
|
||||
@ -34,9 +34,7 @@ if (GETPOST('msg','alpha')) $message='<div class="error">'.GETPOST('msg','alpha'
|
||||
|
||||
|
||||
$urldolibarr='http://www.dolibarr.org/downloads/';
|
||||
//$urldolibarrmodules='http://www.dolibarr.org/downloads/cat_view/65-modulesaddon';
|
||||
$urldolibarrmodules='http://www.dolistore.com/';
|
||||
//$urldolibarrthemes='http://www.dolibarr.org/';
|
||||
$urldolibarrthemes='http://www.dolistore.com/';
|
||||
$dolibarrroot=preg_replace('/([\\/]+)$/i','',DOL_DOCUMENT_ROOT);
|
||||
$dolibarrroot=preg_replace('/([^\\/]+)$/i','',$dolibarrroot);
|
||||
@ -83,7 +81,7 @@ if (GETPOST('action','alpha')=='install')
|
||||
{
|
||||
$langs->load("errors");
|
||||
$mesg = '<div class="error">'.$langs->trans($result['error'],$original_file).'</div>';
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -935,12 +935,12 @@ class User extends CommonObject
|
||||
|
||||
// Positionne parametres
|
||||
$this->admin = 0;
|
||||
$this->nom = $member->nom;
|
||||
$this->prenom = $member->prenom;
|
||||
$this->lastname = $member->lastname;
|
||||
$this->firstname = $member->firstname;
|
||||
$this->email = $member->email;
|
||||
$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->db->begin();
|
||||
@ -1044,8 +1044,8 @@ class User extends CommonObject
|
||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
|
||||
|
||||
// Clean parameters
|
||||
$this->nom = trim($this->nom); // TODO deprecated
|
||||
$this->prenom = trim($this->prenom); // TODO deprecated
|
||||
$this->nom = trim($this->nom); // deprecated
|
||||
$this->prenom = trim($this->prenom); // deprecated
|
||||
$this->lastname = trim($this->lastname);
|
||||
$this->firstname = trim($this->firstname);
|
||||
$this->login = trim($this->login);
|
||||
@ -1139,8 +1139,10 @@ class User extends CommonObject
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
$adh->prenom=$this->firstname;
|
||||
$adh->nom=$this->lastname;
|
||||
$adh->prenom=$this->firstname; // deprecated
|
||||
$adh->nom=$this->lastname; // deprecated
|
||||
$adh->firstname=$this->firstname;
|
||||
$adh->lastname=$this->lastname;
|
||||
$adh->login=$this->login;
|
||||
$adh->pass=$this->pass;
|
||||
$adh->societe=(empty($adh->societe) && $this->societe_id ? $this->societe_id : $adh->societe);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user