本文整理汇总了PHP中Display::addFlash方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::addFlash方法的具体用法?PHP Display::addFlash怎么用?PHP Display::addFlash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::addFlash方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
if (!isset($_GET['user'], $_GET['skill'])) {
header('Location: ' . api_get_path(WEB_PATH));
exit;
}
$entityManager = Database::getManager();
$user = $entityManager->find('ChamiloUserBundle:User', $_GET['user']);
$skill = $entityManager->find('ChamiloCoreBundle:Skill', $_GET['skill']);
if (!$user || !$skill) {
Display::addFlash(Display::return_message(get_lang('NoResults'), 'error'));
header('Location: ' . api_get_path(WEB_PATH));
exit;
}
$skillUserRepo = $entityManager->getRepository('ChamiloCoreBundle:SkillRelUser');
$userSkills = $skillUserRepo->findBy(['userId' => $user->getId(), 'skillId' => $skill->getId()]);
if (!$userSkills) {
Display::addFlash(Display::return_message(get_lang('TheUserXNotYetAchievedTheSkillX'), 'error'));
header('Location: ' . api_get_path(WEB_PATH));
exit;
}
$userInfo = ['id' => $user->getId(), 'complete_name' => $user->getCompleteName()];
$skillInfo = ['id' => $skill->getId(), 'name' => $skill->getName(), 'short_code' => $skill->getShortCode(), 'description' => $skill->getDescription(), 'criteria' => $skill->getCriteria(), 'badge_image' => $skill->getWebIconPath(), 'courses' => []];
$badgeAssertions = [];
foreach ($userSkills as $userSkill) {
$sessionId = 0;
$course = $entityManager->find('ChamiloCoreBundle:Course', $userSkill->getCourseId());
$courseName = $course ? $course->getTitle() : '';
if ($userSkill->getSessionId()) {
$session = $entityManager->find('ChamiloCoreBundle:Session', $userSkill->getSessionId());
$sessionId = $session->getId();
$courseName = "[{$session->getName()}] {$course->getTitle()}";
}
示例2: array
if (!is_array($user_list)) {
$user_list = array();
}
if ($form_sent == 1) {
// invite this users
$result = $usergroup->add_users_to_groups($user_list, array($group_id), GROUP_USER_PERMISSION_PENDING_INVITATION);
$title = get_lang('YouAreInvitedToGroup') . ' ' . $group_info['name'];
$content = get_lang('YouAreInvitedToGroupContent') . ' ' . $group_info['name'] . ' <br />';
$content .= get_lang('ToSubscribeClickInTheLinkBelow') . ' <br />';
$content .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php?accept=' . $group_id . '">' . get_lang('Subscribe') . '</a>';
if (is_array($user_list) && count($user_list) > 0) {
//send invitation message
foreach ($user_list as $user_id) {
$result = MessageManager::send_message($user_id, $title, $content);
}
Display::addFlash(Display::return_message(get_lang('InvitationSent')));
}
header('Location: ' . api_get_self() . '?id=' . $group_id);
exit;
}
}
$nosessionUsersList = $sessionUsersList = array();
$order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
$friends = SocialManager::get_friends(api_get_user_id());
$suggest_friends = false;
$Users = array();
if (!$friends) {
$suggest_friends = true;
} else {
foreach ($friends as $friend) {
$group_friend_list = $usergroup->get_groups_by_user($friend['friend_user_id'], 0);
示例3: get_lang
//@todo move this somewhere else
$subject = get_lang('ExamSheetVCC');
$message = '<p>' . get_lang('DearStudentEmailIntroduction') . '</p><p>' . get_lang('AttemptVCC');
$message .= '<h3>' . get_lang('CourseName') . '</h3><p>' . Security::remove_XSS($course_info['name']) . '';
$message .= '<h3>' . get_lang('Exercise') . '</h3><p>' . Security::remove_XSS($test);
//Only for exercises not in a LP
if ($lp_id == 0) {
$message .= '<p>' . get_lang('ClickLinkToViewComment') . ' <a href="#url#">#url#</a><br />';
}
$message .= '<p>' . get_lang('Regards') . '</p>';
$message .= $from_name;
$message = str_replace("#test#", Security::remove_XSS($test), $message);
$message = str_replace("#url#", $url, $message);
MessageManager::send_message_simple($student_id, $subject, $message, api_get_user_id());
if ($allowCoachFeedbackExercises) {
Display::addFlash(Display::return_message(get_lang('MessageSent')));
header('Location: ' . api_get_path(WEB_PATH));
exit;
}
}
//Updating LP score here
if (in_array($origin, array('tracking_course', 'user_course', 'correct_exercise_in_lp'))) {
$sql = "UPDATE {$TBL_LP_ITEM_VIEW} SET score = '" . floatval($tot) . "'\n WHERE c_id = " . $course_id . " AND id = " . $lp_item_view_id;
Database::query($sql);
if ($origin == 'tracking_course') {
//Redirect to the course detail in lp
header('location: exercise.php?course=' . Security::remove_XSS($_GET['course']));
exit;
} else {
//Redirect to the reporting
header('location: ../mySpace/myStudents.php?origin=' . $origin . '&student=' . $student_id . '&details=true&course=' . $course_id . '&session_id=' . $session_id);
示例4: addNode
if ($action == 'add') {
$ret = addNode($_POST['code'], $_POST['name'], $_POST['auth_course_child'], $category);
Display::addFlash(Display::return_message(get_lang('Created')));
} else {
$ret = editNode($_POST['code'], $_POST['name'], $_POST['auth_course_child'], $categoryId);
Display::addFlash(Display::return_message(get_lang('Updated')));
}
if ($ret) {
$action = '';
} else {
$errorMsg = get_lang('CatCodeAlreadyUsed');
}
} elseif ($action == 'moveUp') {
moveNodeUp($categoryId, $_GET['tree_pos'], $category);
header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category));
Display::addFlash(Display::return_message(get_lang('Updated')));
exit;
}
}
$tool_name = get_lang('AdminCategories');
$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
Display::display_header($tool_name);
if ($action == 'add' || $action == 'edit') {
if (api_get_multiple_access_url() && api_get_current_access_url_id() == 1 || !api_get_multiple_access_url() || isset($_configuration['enable_multiple_url_support_for_course_category']) && $_configuration['enable_multiple_url_support_for_course_category']) {
echo '<div class="actions">';
echo Display::url(Display::return_icon('folder_up.png', get_lang("Back"), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH) . 'admin/course_category.php?category=' . Security::remove_XSS($category));
echo '</div>';
$form_title = $action == 'add' ? get_lang('AddACategory') : get_lang('EditNode');
if (!empty($category)) {
$form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category);
}
示例5: api_not_allowed
api_not_allowed(true);
} else {
$group_info = $usergroup->get($group_id);
if (empty($group_info)) {
api_not_allowed(true);
}
$is_member = $usergroup->is_group_member($group_id);
if ($group_info['visibility'] == GROUP_PERMISSION_CLOSED && !$is_member) {
api_not_allowed(true);
}
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
$group_role = $usergroup->get_user_group_role(api_get_user_id(), $group_id);
if (api_is_platform_admin() || in_array($group_role, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_MODERATOR))) {
$usergroup->delete_topic($group_id, $topic_id);
Display::addFlash(DIsplay::return_message(get_lang('Deleted')));
header("Location: group_view.php?id={$group_id}");
exit;
}
}
$content = null;
$social_right_content = '';
if (isset($_POST['action'])) {
$title = isset($_POST['title']) ? $_POST['title'] : null;
$content = $_POST['content'];
$group_id = intval($_POST['group_id']);
$parent_id = intval($_POST['parent_id']);
if ($_POST['action'] == 'reply_message_group') {
$title = cut($content, 50);
}
if ($_POST['action'] == 'edit_message_group') {
示例6: send_message
/**
* Sends a message to a user/group
*
* @param int $receiver_user_id
* @param string $subject
* @param string $content
* @param array $file_attachments files array($_FILES) (optional)
* @param array $file_comments about attachment files (optional)
* @param int $group_id (optional)
* @param int $parent_id (optional)
* @param int $edit_message_id id for updating the message (optional)
* @param int $topic_id (optional) the default value is the current user_id
* @param int $sender_id
* @return bool
*/
public static function send_message($receiver_user_id, $subject, $content, $file_attachments = array(), $file_comments = array(), $group_id = 0, $parent_id = 0, $edit_message_id = 0, $topic_id = 0, $sender_id = null, $directMessage = false)
{
$table_message = Database::get_main_table(TABLE_MESSAGE);
$group_id = intval($group_id);
$receiver_user_id = intval($receiver_user_id);
$parent_id = intval($parent_id);
$edit_message_id = intval($edit_message_id);
$topic_id = intval($topic_id);
if (!empty($receiver_user_id)) {
$receiverUserInfo = api_get_user_info($receiver_user_id);
// Disabling messages for inactive users.
if ($receiverUserInfo['active'] == 0) {
return false;
}
}
if (empty($sender_id)) {
$user_sender_id = api_get_user_id();
} else {
$user_sender_id = intval($sender_id);
}
$total_filesize = 0;
if (is_array($file_attachments)) {
foreach ($file_attachments as $file_attach) {
$total_filesize += $file_attach['size'];
}
}
// Validating fields
if (empty($subject) && empty($group_id)) {
Display::addFlash(Display::return_message(get_lang('YouShouldWriteASubject'), 'warning'));
return false;
} else {
if ($total_filesize > intval(api_get_setting('message.message_max_upload_filesize'))) {
$warning = sprintf(get_lang("FilesSizeExceedsX"), format_file_size(api_get_setting('message.message_max_upload_filesize')));
Display::addFlash(Display::return_message($warning, 'warning'));
return false;
}
}
$inbox_last_id = null;
//Just in case we replace the and \n and \n\r while saving in the DB
$content = str_replace(array("\n", "\n\r"), '<br />', $content);
$now = api_get_utc_datetime();
if (!empty($receiver_user_id) || !empty($group_id)) {
// message for user friend
$clean_subject = Database::escape_string($subject);
$clean_content = Database::escape_string($content);
//message in inbox for user friend
//@todo it's possible to edit a message? yes, only for groups
if ($edit_message_id) {
$query = " UPDATE {$table_message} SET\n update_date = '" . $now . "',\n content = '{$clean_content}'\n WHERE id = '{$edit_message_id}' ";
Database::query($query);
$inbox_last_id = $edit_message_id;
} else {
$params = ['user_sender_id' => $user_sender_id, 'user_receiver_id' => $receiver_user_id, 'msg_status' => '1', 'send_date' => $now, 'title' => $subject, 'content' => $content, 'group_id' => $group_id, 'parent_id' => $parent_id, 'update_date' => $now];
$inbox_last_id = Database::insert($table_message, $params);
}
// Save attachment file for inbox messages
if (is_array($file_attachments)) {
$i = 0;
foreach ($file_attachments as $file_attach) {
if ($file_attach['error'] == 0) {
self::save_message_attachment_file($file_attach, $file_comments[$i], $inbox_last_id, null, $receiver_user_id, $group_id);
}
$i++;
}
}
if (empty($group_id)) {
// message in outbox for user friend or group
$params = ['user_sender_id' => $user_sender_id, 'user_receiver_id' => $receiver_user_id, 'msg_status' => '4', 'send_date' => $now, 'title' => $subject, 'content' => $content, 'group_id' => $group_id, 'parent_id' => $parent_id, 'update_date' => $now];
$outbox_last_id = Database::insert($table_message, $params);
// save attachment file for outbox messages
if (is_array($file_attachments)) {
$o = 0;
foreach ($file_attachments as $file_attach) {
if ($file_attach['error'] == 0) {
self::save_message_attachment_file($file_attach, $file_comments[$o], $outbox_last_id, $user_sender_id);
}
$o++;
}
}
}
// Load user settings.
$notification = new Notification();
$sender_info = api_get_user_info($user_sender_id);
if (empty($group_id)) {
$type = Notification::NOTIFICATION_TYPE_MESSAGE;
//.........这里部分代码省略.........
示例7: api_not_allowed
break;
case 'visible':
if (!$is_allowed_to_edit) {
api_not_allowed();
}
api_item_property_update($courseInfo, 'work', $work_id, 'visible', api_get_user_id(), null, null, null, null, $session_id);
Display::addFlash(Display::return_message(get_lang('VisibilityChanged'), 'confirmation'));
header('Location: ' . $currentUrl);
exit;
break;
case 'invisible':
if (!$is_allowed_to_edit) {
api_not_allowed();
}
api_item_property_update($courseInfo, 'work', $work_id, 'invisible', api_get_user_id(), null, null, null, null, $session_id);
Display::addFlash(Display::return_message(get_lang('VisibilityChanged'), 'confirmation'));
header('Location: ' . $currentUrl);
exit;
break;
case 'list':
/* Display list of student publications */
if (!empty($my_folder_data['description'])) {
$content = '<p><div><strong>' . get_lang('Description') . ':</strong><p>' . Security::remove_XSS($my_folder_data['description'], STUDENT) . '</p></div></p>';
}
if (api_is_allowed_to_edit() || api_is_coach()) {
// Work list
$content .= '<div class="toolbar-works"><a id="open-view-list" class="btn btn-primary" href="#"><i class="fa fa-users"></i> Ver Estudiantes</a></div>';
$content .= '<div class="row">';
$content .= '<div class="col-md-12">';
$content .= '<div id="work-list" class="table-responsive">';
$content .= showTeacherWorkGrid();
示例8: api_protect_admin_script
<?php
/* For license terms, see /license.txt */
/**
* Configuration script for the Buy Courses plugin
* @package chamilo.plugin.buycourses
*/
/**
* Initialization
*/
$cidReset = true;
require_once '../../../main/inc/global.inc.php';
$plugin = BuyCoursesPlugin::create();
$includeSession = $plugin->get('include_sessions') === 'true';
api_protect_admin_script(true);
Display::addFlash(Display::return_message(get_lang('Info') . ' - ' . $plugin->get_lang('CoursesInSessionsDoesntDisplayHere'), 'info'));
$courses = $plugin->getCoursesForConfiguration();
//view
$interbreadcrumb[] = ['url' => 'course_catalog.php', 'name' => $plugin->get_lang('CourseListOnSale')];
$interbreadcrumb[] = ['url' => 'paymentsetup.php', 'name' => get_lang('Configuration')];
$templateName = $plugin->get_lang('AvailableCourses');
$tpl = new Template($templateName);
$tpl->assign('product_type_course', BuyCoursesPlugin::PRODUCT_TYPE_COURSE);
$tpl->assign('product_type_session', BuyCoursesPlugin::PRODUCT_TYPE_SESSION);
$tpl->assign('courses', $courses);
$tpl->assign('sessions_are_included', $includeSession);
if ($includeSession) {
$sessions = $plugin->getSessionsForConfiguration();
$tpl->assign('sessions', $sessions);
}
$content = $tpl->fetch('buycourses/view/configuration.tpl');
示例9: api_get_local_time
$expiration_date = $user_data['expiration_date'];
if (empty($expiration_date)) {
$user_data['radio_expiration_date'] = 0;
$user_data['expiration_date'] = api_get_local_time();
} else {
$user_data['radio_expiration_date'] = 1;
$user_data['expiration_date'] = api_get_local_time($expiration_date);
}
$form->setDefaults($user_data);
$error_drh = false;
// Validate form
if ($form->validate()) {
$user = $form->getSubmitValues(1);
$reset_password = intval($user['reset_password']);
if ($reset_password == 2 && empty($user['password'])) {
Display::addFlash(Display::return_message(get_lang('PasswordIsTooShort')));
header('Location: ' . api_get_self() . '?user_id=' . $user_id);
exit;
}
$is_user_subscribed_in_course = CourseManager::is_user_subscribed_in_course($user['user_id']);
if ($user['status'] == DRH && $is_user_subscribed_in_course) {
$error_drh = true;
} else {
$picture_element = $form->getElement('picture');
$picture = $picture_element->getValue();
$picture_uri = $user_data['picture_uri'];
if (isset($user['delete_picture']) && $user['delete_picture']) {
$picture_uri = UserManager::delete_user_picture($user_id);
} elseif (!empty($picture['name'])) {
$picture_uri = UserManager::update_user_picture($user_id, $_FILES['picture']['name'], $_FILES['picture']['tmp_name']);
}
示例10: api_get_jqgrid_js
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : null;
$idChecked = isset($_REQUEST['idChecked']) ? $_REQUEST['idChecked'] : null;
$list_type = isset($_REQUEST['list_type']) ? $_REQUEST['list_type'] : 'simple';
if ($action == 'delete') {
SessionManager::delete($idChecked);
Display::addFlash(Display::return_message(get_lang('Deleted')));
header('Location: session_list.php');
exit;
} elseif ($action == 'copy') {
$result = SessionManager::copy($idChecked);
if ($result) {
Display::addFlash(Display::return_message(get_lang('ItemCopied')));
} else {
Display::addFlash(Display::return_message(get_lang('ThereWasAnError'), 'error'));
}
header('Location: session_list.php');
exit;
}
$tool_name = get_lang('SessionList');
Display::display_header($tool_name);
$url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course';
$courseList = array();
$courseId = isset($_GET['course_id']) ? $_GET['course_id'] : null;
if (!empty($courseId)) {
$courseInfo = api_get_course_info_by_id($courseId);
$parents = getParentsToString($courseInfo['categoryCode']);
$courseList[$courseInfo['code']] = $parents . $courseInfo['title'];
}
$sessionFilter = new FormValidator('course_filter', 'get', '', '', array(), FormValidator::LAYOUT_INLINE);
示例11: api_substr
Display::display_error_message(get_lang('InvallidSurvey'), false);
Display::display_footer();
exit;
}
$urlname = api_substr(api_html_entity_decode($surveyData['title'], ENT_QUOTES), 0, 40);
if (api_strlen(strip_tags($surveyData['title'])) > 40) {
$urlname .= '...';
}
if ($surveyData['survey_type'] == 1) {
$sql = 'SELECT id FROM ' . Database::get_course_table(TABLE_SURVEY_QUESTION_GROUP) . '
WHERE
c_id = ' . $course_id . ' AND
survey_id = ' . (int) $_GET['survey_id'] . ' LIMIT 1';
$rs = Database::query($sql);
if (Database::num_rows($rs) === 0) {
Display::addFlash(Display::return_message(get_lang('YouNeedToCreateGroups')));
header('Location: ' . api_get_path(WEB_CODE_PATH) . 'survey/survey.php?survey_id=' . (int) $_GET['survey_id']);
exit;
}
}
// Breadcrumbs
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'survey/survey_list.php', 'name' => get_lang('SurveyList'));
$interbreadcrumb[] = array('url' => api_get_path(WEB_CODE_PATH) . 'survey/survey.php?survey_id=' . intval($_GET['survey_id']), 'name' => strip_tags($urlname));
// Tool name
if ($_GET['action'] == 'add') {
$tool_name = get_lang('AddQuestion');
}
if ($_GET['action'] == 'edit') {
$tool_name = get_lang('EditQuestion');
}
// The possible question types
示例12: intval
if ($form->validate()) {
$values = $form->getSubmitValues();
$keyword = $values['keyword'];
}
$actionsRight = $form->returnForm();
$social_right_content .= Display::toolbarAction('toolbar', [$actionsLeft, $actionsRight]);
}
//MAIN CONTENT
if (!isset($_GET['del_msg'])) {
$social_right_content .= MessageManager::inbox_display();
} else {
$num_msg = intval($_POST['total']);
for ($i = 0; $i < $num_msg; $i++) {
if ($_POST[$i]) {
//the user_id was necesarry to delete a message??
Display::addFlash(MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_POST['_' . $i]));
}
}
$social_right_content .= MessageManager::inbox_display();
}
if (api_get_setting('social.allow_social_tool') == 'true') {
$social_right_content .= '</div>';
}
$tpl = \Chamilo\CoreBundle\Framework\Container::getTwig();
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'messages');
if (api_get_setting('social.allow_social_tool') == 'true') {
$tpl->addGlobal('social_menu_block', $social_menu_block);
$tpl->addGlobal('social_right_content', $social_right_content);
echo $tpl->render('@template_style/social/inbox.html.twig');
} else {
示例13: destroy
/**
* It's used for destroy a course description,
* render to listing view
* @param int $id description type
*/
public function destroy($id)
{
$course_description = new CourseDescription();
$session_id = api_get_session_id();
$course_description->set_session_id($session_id);
if (!empty($id)) {
$course_description->set_id($id);
$course_description->delete();
Display::addFlash(Display::return_message(get_lang('CourseDescriptionDeleted')));
}
$this->listing(false);
}
示例14: api_get_user_id
$user_id = api_get_user_id();
DocumentManager::unset_document_as_template($document_id_for_template, $course_code, $user_id);
Display::addFlash(Display::return_message(get_lang('DocumentUnsetAsTemplate'), 'confirmation'));
}
}
// END ACTION MENU
// Attach certificate in the gradebook
if (isset($_GET['curdirpath']) && $_GET['curdirpath'] == '/certificates' && isset($_GET['set_certificate']) && $_GET['set_certificate'] == strval(intval($_GET['set_certificate']))) {
if (isset($_GET['cidReq'])) {
$course_id = Security::remove_XSS($_GET['cidReq']);
// course id
$document_id = Security::remove_XSS($_GET['set_certificate']);
// document id
DocumentManager::attach_gradebook_certificate($course_id, $document_id);
$message = Display::return_message(get_lang('IsDefaultCertificate'), 'normal');
Display::addFlash($message);
}
}
/* GET ALL DOCUMENT DATA FOR CURDIRPATH */
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
$documentAndFolders = DocumentManager::get_all_document_data($courseInfo, $curdirpath, $groupId, null, $is_allowed_to_edit || $group_member_with_upload_rights, true);
} else {
$documentAndFolders = DocumentManager::get_all_document_data($courseInfo, $curdirpath, $groupId, null, $is_allowed_to_edit || $group_member_with_upload_rights, false);
}
if ($groupId != 0) {
$userAccess = GroupManager::user_has_access(api_get_user_id(), $groupId, GroupManager::GROUP_TOOL_DOCUMENTS);
if ($userAccess) {
$folders = DocumentManager::get_all_document_folders($courseInfo, $groupId, $is_allowed_to_edit || $group_member_with_upload_rights);
}
} else {
$folders = DocumentManager::get_all_document_folders($courseInfo, $groupId, $is_allowed_to_edit || $group_member_with_upload_rights);
示例15: sendResetEmail
/**
* @param User $user
*/
public static function sendResetEmail(User $user)
{
//if (null === $user->getConfirmationToken()) {
$uniqueId = api_get_unique_id();
$user->setConfirmationToken($uniqueId);
$user->setPasswordRequestedAt(new \DateTime());
Database::getManager()->persist($user);
Database::getManager()->flush();
$url = api_get_path(WEB_CODE_PATH) . 'auth/reset.php?token=' . $uniqueId;
$mailTemplate = new Template(null, false, false, false, false, false);
$mailTemplate->assign('complete_user_name', $user->getCompleteName());
$mailTemplate->assign('link', $url);
$mailLayout = $mailTemplate->get_template('mail/reset_password.tpl');
$mailSubject = get_lang('ResetPasswordInstructions');
$mailBody = $mailTemplate->fetch($mailLayout);
api_mail_html($user->getCompleteName(), $user->getEmail(), $mailSubject, $mailBody);
Display::addFlash(Display::return_message(get_lang('CheckYourEmailAndFollowInstructions')));
//}
}