Hello,
Is there a way I can setup that when a new user is registered on website, user department to receive the e-mail user receives?
I found the code but something is not working:
// Notify administrator about new profile
Mailer::sendMail(array(
'to' => 'company_users_department',
'from' => 'company_users_department',
'reply_to' => $user_data['email'],
'data' => array(
'user_data' => $user_data,
),
'tpl' => 'profiles/activate_profile.tpl',
'company_id' => $user_data['company_id']
), 'A', Registry::get('settings.Appearance.backend_default_language'));
$skip_auth = true;
} else {
fn_set_notification('N', __('information'), __('text_profile_is_created'));
}
}
if (!is_null($auth)) {
if (!empty($auth['order_ids'])) {
db_query("UPDATE ?:orders SET user_id = ?i WHERE order_id IN (?n)", $user_id, $auth['order_ids']);
}
if (empty($skip_auth)) {
$auth = fn_fill_auth($user_data);
}
}
} else {
if (AREA == 'C') {
fn_set_notification('N', __('information'), __('text_profile_is_updated'));
}
}
fn_set_hook('update_profile', $action, $user_data, $current_user_data);
return array($user_id, !empty($user_data['profile_id']) ? $user_data['profile_id'] : false);
}
I try to manualy replace: 'to' => 'company_users_department', with 'to' => 'my@mai.com', but this changes nothing.
Please help!!!