update pull request with sql in simple quotes
This commit is contained in:
parent
841736df87
commit
7c7f80fb59
@ -1417,13 +1417,15 @@ class User extends CommonObject
|
|||||||
// Create user and set $this->id. Trigger is disabled because executed later.
|
// Create user and set $this->id. Trigger is disabled because executed later.
|
||||||
$result = $this->create($user, 1);
|
$result = $this->create($user, 1);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'user';
|
||||||
$sql .= " SET fk_socpeople=".$contact->id;
|
$sql .= ' SET fk_socpeople='.$contact->id;
|
||||||
$sql .= ", civility=\"".$contact->civility_code."\"";
|
$sql .= ', civility="'.$contact->civility_code.'"';
|
||||||
if ($contact->socid) {
|
if ($contact->socid) {
|
||||||
$sql .= ", fk_soc=".$contact->socid;
|
$sql .= ', fk_soc='.$contact->socid;
|
||||||
}
|
}
|
||||||
$sql .= " WHERE rowid=".$this->id;
|
$sql .= ' WHERE rowid='.$this->id;
|
||||||
|
print var_dump($sql);
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create_from_contact", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create_from_contact", LOG_DEBUG);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user