Skip to content
Permalink
Browse files

Add setting "send_inscription_msg_to_inbox" see BT#14034

Send inscription message by email and to the chamilo inbox
  • Loading branch information...
jmontoyaa committed Feb 19, 2018
1 parent 980467c commit 6e619d2835e526e455e1df726dfb488b75d07da9
Showing with 33 additions and 12 deletions.
  1. +29 −12 main/inc/lib/usermanager.lib.php
  2. +4 −0 main/install/configuration.dist.php
@@ -544,18 +544,35 @@ public static function create_user(
$additionalParameters
);
} else {
api_mail_html(
$recipient_name,
$email,
$emailSubject,
$emailBody,
$sender_name,
$email_admin,
null,
null,
null,
$additionalParameters
);
$sendToInbox = api_get_configuration_value('send_inscription_msg_to_inbox');
if ($sendToInbox) {
$adminList = UserManager::get_all_administrators();
$senderId = 1;
if (!empty($adminList)) {
$adminInfo = current($adminList);
$senderId = $adminInfo['user_id'];
}
MessageManager::send_message_simple(
$userId,
$emailSubject,
$emailBody,
$senderId
);
} else {
api_mail_html(
$recipient_name,
$email,
$emailSubject,
$emailBody,
$sender_name,
$email_admin,
null,
null,
null,
$additionalParameters
);
}
}
$notification = api_get_configuration_value('send_notification_when_user_added');
@@ -768,6 +768,10 @@
// Hide exercise question label (ribbon) BT#13950
//$_configuration['exercise_hide_label'] = false;
// Send welcome message by email and to the chamilo inbox BT#14034
//$_configuration['send_inscription_msg_to_inbox'] = false;
// ------ Custom DB changes
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

0 comments on commit 6e619d2

Please sign in to comment.
You can’t perform that action at this time.