diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 796566fb638..c9673ceb360 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -26,7 +26,7 @@ create table llx_user ref_ext varchar(50), -- reference into an external system (not used by dolibarr) ref_int varchar(50), -- reference into an internal system (deprecated) - employee tinyint DEFAULT 0, -- employee 0/1 + employee tinyint DEFAULT 0, -- 1 if user is an employee datec datetime, tms timestamp, @@ -76,7 +76,6 @@ create table llx_user nb_holiday integer DEFAULT 0, thm double(24,8), tjm double(24,8), - employee tinyint DEFAULT 1, -- 1 if user is an employee salary double(24,8), salaryextra double(24,8), weeklyhours double(16,8) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 85a96ebe415..066da9c18da 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1156,7 +1156,7 @@ class User extends CommonObject // Clean parameters $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); - $this->employee = trim($this->employee); + $this->employee = $this->employee?$this->employee:0; $this->login = trim($this->login); $this->gender = trim($this->gender); $this->pass = trim($this->pass);