2
0
forked from Wavyzz/dolibarr

Add patch to add signature on user.

This commit is contained in:
Laurent Destailleur
2011-06-29 10:23:32 +00:00
parent c7475f95a6
commit 484d5ce81a
5 changed files with 1873 additions and 1836 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
--
-- $Id: 3.0.0-3.1.0.sql,v 1.75 2011/06/28 07:47:10 eldy Exp $
-- $Id: 3.0.0-3.1.0.sql,v 1.76 2011/06/29 10:23:33 eldy Exp $
--
-- Be carefull to requests order.
-- This file must be loaded by calling /install/index.php page
@@ -425,3 +425,6 @@ ALTER TABLE llx_c_type_contact ADD COLUMN module varchar(32) NULL;
ALTER TABLE llx_c_typent ADD COLUMN module varchar(32) NULL;
ALTER TABLE llx_c_effectif ADD COLUMN module varchar(32) NULL;
ALTER TABLE llx_c_forme_juridique ADD COLUMN module varchar(32) NULL;
ALTER TABLE llx_user ADD signature text DEFAULT NULL AFTER email;

View File

@@ -1,6 +1,6 @@
-- ============================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2007-2009 Regis Houssin <regis@dolibarr.fr>
--
-- This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Id: llx_user.sql,v 1.8 2011/06/29 10:23:33 eldy Exp $
-- ===========================================================================
create table llx_user
@@ -39,6 +39,7 @@ create table llx_user
office_fax varchar(20),
user_mobile varchar(20),
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)

View File

@@ -25,7 +25,7 @@
/**
* \file htdocs/user/class/user.class.php
* \brief Fichier de la classe utilisateur
* \version $Id$
* \version $Id: user.class.php,v 1.43 2011/06/29 10:23:32 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
@@ -53,6 +53,7 @@ class User extends CommonObject
var $firstname;
var $note;
var $email;
var $signature;
var $office_phone;
var $office_fax;
var $user_mobile;
@@ -116,7 +117,7 @@ class User extends CommonObject
}
/**
* Charge un objet user avec toutes ces caracteristiques depuis un id ou login
* Load a user from database with its id or ref (login)
* @param id Si defini, id a utiliser pour recherche
* @param login Si defini, login a utiliser pour recherche
* @param sid Si defini, sid a utiliser pour recherche
@@ -127,11 +128,11 @@ class User extends CommonObject
{
global $conf;
// Nettoyage parametres
// Clean parameters
$login=trim($login);
// Recupere utilisateur
$sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.office_phone, u.office_fax, u.user_mobile,";
// Get user
$sql = "SELECT u.rowid, u.name, u.firstname, u.email, 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.pass, u.pass_crypted, u.pass_temp,";
$sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.ldap_sid,";
@@ -184,6 +185,7 @@ class User extends CommonObject
$this->office_fax = $obj->office_fax;
$this->user_mobile = $obj->user_mobile;
$this->email = $obj->email;
$this->signature = $obj->signature;
$this->admin = $obj->admin;
$this->note = $obj->note;
$this->statut = $obj->statut;
@@ -1008,6 +1010,7 @@ class User extends CommonObject
$this->office_fax = trim($this->office_fax);
$this->user_mobile = trim($this->user_mobile);
$this->email = trim($this->email);
$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);
@@ -1038,6 +1041,7 @@ class User extends CommonObject
$sql.= ", office_fax = '".$this->db->escape($this->office_fax)."'";
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
$sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", signature = '".addslashes($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)."'";
@@ -1483,7 +1487,7 @@ class User extends CommonObject
function SetInGroup($group, $entity, $notrigger=0)
{
global $conf, $langs, $user;
$error=0;
$this->db->begin();
@@ -1510,7 +1514,7 @@ class User extends CommonObject
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
if (! $error)
{
$this->db->commit();
@@ -1540,7 +1544,7 @@ class User extends CommonObject
function RemoveFromGroup($group, $entity, $notrigger=0)
{
global $conf,$langs,$user;
$error=0;
$this->db->begin();

File diff suppressed because it is too large Load Diff