diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index 5ed00c1fd6e..37c5aaba693 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -589,8 +589,6 @@ if ($action == 'create')
print ' ';
print '';
- add_row_for_calendar_link();
-
// Description
print '
'.$langs->trans("Description").' ';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -1061,90 +1059,8 @@ if ($id > 0)
print '';
}
+
llxFooter();
$db->close();
-
-
-/**
- * Ajoute une ligne de tableau a 2 colonnes pour avoir l'option synchro calendrier
- *
- * @return int Retourne le nombre de lignes ajoutees
- */
-function add_row_for_calendar_link()
-{
- global $conf,$langs,$user;
- $nbtr=0;
-
- // Lien avec calendrier si module active
- // TODO external module
- if (! empty($conf->webcalendar->enabled))
- {
- if ($conf->global->PHPWEBCALENDAR_SYNCRO != 'never')
- {
- $langs->load("other");
-
- print ' '.$langs->trans("AddCalendarEntry","Webcalendar").' ';
-
- if (! $user->webcal_login)
- {
- print ' ';
- print ' '.$langs->transnoentities("ErrorWebcalLoginNotDefined","id."\">".$user->login." ");
- print ' ';
- print ' ';
- $nbtr++;
- }
- else
- {
- if ($conf->global->PHPWEBCALENDAR_SYNCRO == 'always')
- {
- print ' ';
- }
- else
- {
- print ' global->PHPWEBCALENDAR_SYNCRO=='always' || $conf->global->PHPWEBCALENDAR_SYNCRO=='yesbydefault')?' checked':'').'> ';
- print '';
- $nbtr++;
- }
- }
- }
- }
-
- // TODO external module
- if (! empty($conf->phenix->enabled))
- {
- if ($conf->global->PHPPHENIX_SYNCRO != 'never')
- {
- $langs->load("other");
-
- print ''.$langs->trans("AddCalendarEntry","Phenix").' ';
-
- if (! $user->phenix_login)
- {
- print ' ';
- print ' '.$langs->transnoentities("ErrorPhenixLoginNotDefined","id."\">".$user->login." ");
- print ' ';
- print ' ';
- $nbtr++;
- }
- else
- {
- if ($conf->global->PHPPHENIX_SYNCRO == 'always')
- {
- print ' ';
- }
- else
- {
- print ' global->PHPPHENIX_SYNCRO=='always' || $conf->global->PHPPHENIX_SYNCRO=='yesbydefault')?' checked':'').'> ';
- print '';
- $nbtr++;
- }
- }
- }
- }
-
- return $nbtr;
-}
-
-
?>
diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql
index 6f1f44f6b2c..6042b0906ce 100644
--- a/htdocs/install/mysql/tables/llx_user.sql
+++ b/htdocs/install/mysql/tables/llx_user.sql
@@ -1,6 +1,6 @@
-- ============================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville
--- Copyright (C) 2006-2011 Laurent Destailleur
+-- Copyright (C) 2006-2013 Laurent Destailleur
-- Copyright (C) 2007-2013 Regis Houssin
--
-- This program is free software; you can redistribute it and/or modify
@@ -47,9 +47,6 @@ create table llx_user
email varchar(255),
signature text DEFAULT NULL,
admin smallint DEFAULT 0,
- webcal_login varchar(25), -- TODO move to an extra table (ex: llx_extra_fields)
- phenix_login varchar(25), -- TODO move to an extra table (ex: llx_extra_fields)
- phenix_pass varchar(128), -- TODO move to an extra table (ex: llx_extra_fields)
module_comm smallint DEFAULT 1,
module_compta smallint DEFAULT 1,
fk_societe integer,
@@ -64,6 +61,6 @@ create table llx_user
openid varchar(255),
statut tinyint DEFAULT 1,
photo varchar(255), -- filename or url of photo
- lang varchar(6)
-
+ lang varchar(6),
+ color varchar(6)
)ENGINE=innodb;
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 70883769602..0d50e08e0fd 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -76,11 +76,6 @@ class User extends CommonObject
var $fk_member;
var $fk_user;
- var $webcal_login;
- var $phenix_login;
- var $phenix_pass;
- var $phenix_pass_crypted;
-
var $clicktodial_url;
var $clicktodial_login;
var $clicktodial_password;
@@ -144,7 +139,7 @@ class User extends CommonObject
// Get user
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
- $sql.= " u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note,";
+ $sql.= " u.admin, u.login, u.note,";
$sql.= " u.pass, u.pass_crypted, u.pass_temp,";
$sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,";
$sql.= " u.statut, u.lang, u.entity,";
@@ -220,9 +215,6 @@ class User extends CommonObject
$this->datelastlogin = $this->db->jdate($obj->datel);
$this->datepreviouslogin = $this->db->jdate($obj->datep);
- $this->webcal_login = $obj->webcal_login;
- $this->phenix_login = $obj->phenix_login;
- $this->phenix_pass_crypted = $obj->phenix_pass;
$this->societe_id = $obj->fk_societe;
$this->contact_id = $obj->fk_socpeople;
$this->fk_member = $obj->fk_member;
@@ -1111,12 +1103,6 @@ class User extends CommonObject
$this->signature = trim($this->signature);
$this->note = trim($this->note);
$this->openid = trim(empty($this->openid)?'':$this->openid); // Avoid warning
- $this->webcal_login = trim($this->webcal_login);
- $this->phenix_login = trim($this->phenix_login);
- if ($this->phenix_pass != $this->phenix_pass_crypted)
- {
- $this->phenix_pass = dol_hash(trim($this->phenix_pass));
- }
$this->admin = $this->admin?$this->admin:0;
// Check parameters
@@ -1146,9 +1132,6 @@ class User extends CommonObject
$sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", job = '".$this->db->escape($this->job)."'";
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
- $sql.= ", webcal_login = '".$this->db->escape($this->webcal_login)."'";
- $sql.= ", phenix_login = '".$this->db->escape($this->phenix_login)."'";
- $sql.= ", phenix_pass = '".$this->db->escape($this->phenix_pass)."'";
$sql.= ", note = '".$this->db->escape($this->note)."'";
$sql.= ", photo = ".($this->photo?"'".$this->db->escape($this->photo)."'":"null");
$sql.= ", openid = ".($this->openid?"'".$this->db->escape($this->openid)."'":"null");
@@ -1954,6 +1937,8 @@ class User extends CommonObject
{
global $user,$langs;
+ $now=dol_now();
+
// Initialise parametres
$this->id=0;
$this->ref = 'SPECIMEN';
@@ -1971,12 +1956,11 @@ class User extends CommonObject
$this->pass='dolibspec';
//$this->pass_indatabase='dolibspec'; Set after a fetch
//$this->pass_indatabase_crypted='e80ca5a88c892b0aaaf7e154853bccab'; Set after a fetch
- $this->datec=time();
- $this->datem=time();
- $this->webcal_login='dolibspec';
+ $this->datec=$now;
+ $this->datem=$now;
- $this->datelastlogin=time();
- $this->datepreviouslogin=time();
+ $this->datelastlogin=$now;
+ $this->datepreviouslogin=$now;
$this->statut=1;
//$this->societe_id = 1; For external users
diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php
index 7ff24220b84..5b644b150bf 100644
--- a/htdocs/webservices/server_user.php
+++ b/htdocs/webservices/server_user.php
@@ -357,10 +357,6 @@ function getUser($authentication,$id,$ref='',$ref_ext='')
'fk_thirdparty' => $user->societe_id,
'fk_contact' => $user->contact_id,
'fk_member' => $user->fk_member,
- 'webcal_login' => $user->webcal_login,
- 'phenix_login' => $user->phenix_login,
- 'phenix_pass' => $user->phenix_pass,
- 'phenix_pass_crypted' => $user->phenix_pass_crypted,
'datelastlogin' => dol_print_date($user->datelastlogin,'dayhourrfc'),
'datepreviouslogin' => dol_print_date($user->datepreviouslogin,'dayhourrfc'),
'statut' => $user->statut,