- $message = LOAD_EMAIL_TEMPLATE('guest_request_confirm', array('hash' => $DATA[2]), $DATA[0]);
- sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message);
- $content = getMessage('CONFIRM_LINK_SENT');
+ // Load email template
+ $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']);
+
+ // Send email
+ sendEmail(postRequestElement('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message);
+
+ // And set message
+ $content['message'] = getMessage('CONFIRM_LINK_SENT');