LSformElement::password: fix sendind email in create form

This commit is contained in:
Benjamin Renard 2021-10-21 20:25:58 +02:00
parent 7cb8620cb5
commit c9b2341dbf

View file

@ -152,7 +152,10 @@ class LSformElement_password extends LSformElement {
'mail' => $mail,
'pwd' => $return[$this -> name][0]
);
$this -> attr_html -> attribute -> addObjectEvent('after_modify', $this, 'send');
if ($this -> form -> idForm == 'create')
$this -> attr_html -> attribute -> addObjectEvent('after_create', $this, 'send');
else
$this -> attr_html -> attribute -> addObjectEvent('after_modify', $this, 'send');
}
}
return $retval;