diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fb27aef9d2e..cd0000c1e60 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1050,7 +1050,8 @@ class User extends CommonObject $this->town = $contact->town; $this->state_id = $contact->state_id; $this->country_id = $contact->country_id; - + $this->employee = 0; + if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4)); $this->login = $login;