I have inherited a custom module, which groups together some field of an custom ContentType and sends it by email.
In the module there are 3 functions.
Email check preg match:
function __autoload($class_name) {
require_once($class_name . '.lib.php');
}
require_once('vumclass.lib.php');
This function gets triggered when the node is saved or updated. Right?
function vumveranstaltungsmailer_action_info() {
return array(
'vumveranstaltungsmailer_action' => array(
'type' => 'node',
'label' => 'vumveranstaltungsmailer_action',
'configurable' => FALSE,
'triggers' => array('node_insert', 'node_update'),
),
);
}
Do stuff, send email:
function vumveranstaltungsmailer_action($object, $context) {
//do Stuff, sends email. Not shown here.
//I want to set this field to empty/clear it
$object->field_email_mailer_01['und']['0']['value']->set(NULL);
}
Bare with me, I am pretty a beginner/noob. I am a bit overwhelmed where and how to do it. Please give me a simple solution, so I understand it. Quick and dirty is fine for me ;-)