resend_confirmation_mail.php 775 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /* For license terms, see /license.txt */
  3. require_once __DIR__.'/../inc/global.inc.php';
  4. // Build the form
  5. $form = new FormValidator('resend');
  6. $form->addHeader(get_lang('ReSendConfirmationMail'));
  7. $form->addText('user', get_lang('UserName'), true);
  8. $form->addButtonSend(get_lang('Send'));
  9. if ($form->validate()) {
  10. $values = $form->exportValues();
  11. $user = UserManager::getManager()->findUserByUsername($values['user']);
  12. if ($user) {
  13. UserManager::sendUserConfirmationMail($user);
  14. } else {
  15. Display::addFlash(Display::return_message(get_lang('UserDoesNotExist')));
  16. }
  17. header('Location: '.api_get_path(WEB_PATH));
  18. exit;
  19. }
  20. $tpl = new Template(null);
  21. $tpl->assign('content', $form->toHtml());
  22. $tpl->display_one_col_template();