File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -485,6 +485,7 @@ public static function create_user(
485485
486486 $ layoutContent = $ tplContent ->get_template ('mail/content_registration_platform.tpl ' );
487487 $ emailBody = $ tplContent ->fetch ($ layoutContent );
488+
488489 /* MANAGE EVENT WITH MAIL */
489490 if (EventsMail::check_if_using_class ('user_registration ' )) {
490491 $ values ["about_user " ] = $ return ;
@@ -514,6 +515,15 @@ public static function create_user(
514515 null ,
515516 $ additionalParameters
516517 );
518+
519+
520+ $ notification = api_get_configuration_value (' send_notification_when_user_added ' );
521+ if (!empty ($ notification ) && isset ($ notification ['admins ' ]) && is_array ($ notification ['admins ' ])) {
522+ foreach ($ notification ['admins ' ] as $ adminId ) {
523+ $ emailSubject .= get_lang ('UserAdded ' ).': ' .api_get_person_name ($ firstName , $ lastName );
524+ MessageManager::send_message_simple ($ adminId , $ emailSubject , $ emailBody );
525+ }
526+ }
517527 }
518528
519529 if ($ sendEmailToAllAdmins ) {
Original file line number Diff line number Diff line change 646646// Allow multiple anon users see BT#13324
647647//$_configuration['max_anonymous_users'] = 0;
648648
649+ // Send email notification to admin when a user is created
650+ //$_configuration['send_notification_when_user_added'] = ['admins' => 1 ];
You can’t perform that action at this time.
0 commit comments