New User Registration Send Mail To User Department

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!!!

I manage to do something, that it works for the momment, but I really do not hink this is the way to do it:

in /app/functions/fn.users.php, at line: 1539 I added:

Mailer::sendMail(array(

'to' => $user_data['email'].';'.'anemail@youwanttoreceive.com',



Where: anemail@youwanttoreceive.com is the e-mail you need. This is not the right way, but is working!

[quote name='minute' timestamp='1388656769' post='174407']

I manage to do something, that it works for the momment, but I really do not hink this is the way to do it:

in /app/functions/fn.users.php, at line: 1539 I added:

Mailer::sendMail(array(

'to' => $user_data['email'].';'.'anemail@youwanttoreceive.com',



Where: anemail@youwanttoreceive.com is the e-mail you need. This is not the right way, but is working!

[/quote]



Hi,

doesn't work for me.

Any other solution anyone, please?

Frank

hi, Frank,



please check your PM.



best regards,

WSA team

Why do you need to see it ? To edit it ? Just add a new user to another of your email addresses,

see what the confirmation email says then look it up in Languages to edit it.

hi,



[color=#282828][font=arial, verdana, tahoma, sans-serif]to notify orders department about registration of new user, please check “app/functions/fn.users.php” for function [/font][/color]fn_update_user [color=#282828][font=arial, verdana, tahoma, sans-serif]and find the code:[/font][/color]



Mailer::sendMail(array(
'to' => $user_data['email'],
'from' => $from,
'data' => array(
'password' => $original_password,
'send_password' => $send_password,
'user_data' => $user_data,
),
'tpl' => 'profiles/' . $prefix . '_profile.tpl',
'company_id' => $user_data['company_id']
), fn_check_user_type_admin_area($user_data['user_type']) ? 'A' : 'C', $lang_code);






please add a new code before the mentioned one:



if ($action == 'add' && AREA == 'C') {
Mailer::sendMail(array(
'to' => 'company_orders_department',
'from' => $from,
'data' => array(
'password' => $original_password,
'send_password' => $send_password,
'user_data' => $user_data,
),
'tpl' => 'profiles/' . $prefix . '_profile.tpl',
'company_id' => $user_data['company_id']
), fn_check_user_type_admin_area($user_data['user_type']) ? 'A' : 'C', $lang_code);
}




[color=#282828][font=arial, verdana, tahoma, sans-serif]This additional code would send notification to orders department only for customers registered via store front.[/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]best regards,[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]WSA team[/font][/color]