social network module

This commit is contained in:
Laurent Destailleur 2018-10-12 11:29:47 +02:00
parent cb53e18aa4
commit 82c89f739d

View File

@ -69,7 +69,11 @@ class User extends CommonObject
public $gender;
public $birth;
public $email;
public $skype;
public $twitter;
public $facebook;
public $job; // job position
public $signature;
@ -220,7 +224,8 @@ class User extends CommonObject
$login=trim($login);
// Get user
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.job, u.skype, u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.employee, u.gender, u.birth, u.email, u.job, u.skype, u.twitter, u.facebook,";
$sql.= " u.signature, u.office_phone, u.office_fax, u.user_mobile,";
$sql.= " u.address, u.zip, u.town, u.fk_state as state_id, u.fk_country as country_id,";
$sql.= " u.admin, u.login, u.note,";
$sql.= " u.pass, u.pass_crypted, u.pass_temp, u.api_key,";
@ -325,6 +330,8 @@ class User extends CommonObject
$this->user_mobile = $obj->user_mobile;
$this->email = $obj->email;
$this->skype = $obj->skype;
$this->twitter = $obj->twitter;
$this->facebook = $obj->facebook;
$this->job = $obj->job;
$this->signature = $obj->signature;
$this->admin = $obj->admin;
@ -1220,6 +1227,8 @@ class User extends CommonObject
$this->gender = $contact->gender;
$this->email = $contact->email;
$this->skype = $contact->skype;
$this->twitter = $contact->twitter;
$this->facebook = $contact->facebook;
$this->office_phone = $contact->phone_pro;
$this->office_fax = $contact->fax;
$this->user_mobile = $contact->phone_mobile;
@ -1433,7 +1442,11 @@ class User extends CommonObject
$this->office_fax = trim($this->office_fax);
$this->user_mobile = trim($this->user_mobile);
$this->email = trim($this->email);
$this->skype = trim($this->skype);
$this->twitter = trim($this->twitter);
$this->facebook = trim($this->facebook);
$this->job = trim($this->job);
$this->signature = trim($this->signature);
$this->note = trim($this->note);
@ -1483,6 +1496,8 @@ class User extends CommonObject
$sql.= ", user_mobile = '".$this->db->escape($this->user_mobile)."'";
$sql.= ", email = '".$this->db->escape($this->email)."'";
$sql.= ", skype = '".$this->db->escape($this->skype)."'";
$sql.= ", twitter = '".$this->db->escape($this->twitter)."'";
$sql.= ", facebook = '".$this->db->escape($this->facebook)."'";
$sql.= ", job = '".$this->db->escape($this->job)."'";
$sql.= ", signature = '".$this->db->escape($this->signature)."'";
$sql.= ", accountancy_code = '".$this->db->escape($this->accountancy_code)."'";
@ -1567,7 +1582,11 @@ class User extends CommonObject
$adh->country_id=$this->country_id;
$adh->email=$this->email;
$adh->skype=$this->skype;
$adh->twitter=$this->twitter;
$adh->facebook=$this->facebook;
$adh->phone=$this->office_phone;
$adh->phone_mobile=$this->user_mobile;
@ -1615,7 +1634,11 @@ class User extends CommonObject
//$tmpobj->societe=(empty($tmpobj->societe) && $this->societe_id ? $this->societe_id : $tmpobj->societe);
$tmpobj->email=$this->email;
$tmpobj->skype=$this->skype;
$tmpobj->twitter=$this->twitter;
$tmpobj->facebook=$this->facebook;
$tmpobj->phone_pro=$this->office_phone;
$tmpobj->phone_mobile=$this->user_mobile;
$tmpobj->fax=$this->office_fax;
@ -2474,13 +2497,15 @@ class User extends CommonObject
'LDAP_FIELD_NAME' => 'lastname',
'LDAP_FIELD_FIRSTNAME' => 'firstname',
'LDAP_FIELD_LOGIN' => 'login',
'LDAP_FIELD_LOGIN_SAMBA' => 'login',
'LDAP_FIELD_LOGIN_SAMBA'=> 'login',
'LDAP_FIELD_PHONE' => 'office_phone',
'LDAP_FIELD_MOBILE' => 'user_mobile',
'LDAP_FIELD_FAX' => 'office_fax',
'LDAP_FIELD_FAX' => 'office_fax',
'LDAP_FIELD_MAIL' => 'email',
'LDAP_FIELD_SID' => 'ldap_sid',
'LDAP_FIELD_SKYPE' => 'skype'
'LDAP_FIELD_SID' => 'ldap_sid',
'LDAP_FIELD_SKYPE' => 'skype',
'LDAP_FIELD_TWITTER' => 'twitter',
'LDAP_FIELD_FACEBOOK' => 'facebook'
);
// Champs
@ -2591,7 +2616,9 @@ class User extends CommonObject
$this->gender='man';
$this->note='This is a note';
$this->email='email@specimen.com';
$this->skype='tom.hanson';
$this->skype='skypepseudo';
$this->twitter='twitterpseudo';
$this->facebook='facebookpseudo';
$this->office_phone='0999999999';
$this->office_fax='0999999998';
$this->user_mobile='0999999997';
@ -2745,6 +2772,8 @@ class User extends CommonObject
$this->office_fax=$ldapuser->{$conf->global->LDAP_FIELD_FAX};
$this->email=$ldapuser->{$conf->global->LDAP_FIELD_MAIL};
$this->skype=$ldapuser->{$conf->global->LDAP_FIELD_SKYPE};
$this->twitter=$ldapuser->{$conf->global->LDAP_FIELD_TWITTER};
$this->facebook=$ldapuser->{$conf->global->LDAP_FIELD_FACEBOOK};
$this->ldap_sid=$ldapuser->{$conf->global->LDAP_FIELD_SID};
$this->job=$ldapuser->{$conf->global->LDAP_FIELD_TITLE};