Minor - validate user.

pull/2487/head
jmontoyaa 7 years ago
parent cd0d11d17a
commit f1f1e3bb25
  1. 8
      main/auth/resend_confirmation_mail.php

@ -5,15 +5,19 @@ require_once __DIR__.'/../inc/global.inc.php';
// Build the form
$form = new FormValidator('resend');
$form->addElement('header', get_lang('ReSendConfirmationMail'));
$form->addHeader(get_lang('ReSendConfirmationMail'));
$form->addText('user', get_lang('UserName'), true);
$form->addButtonSend(get_lang('Send'));
if ($form->validate()) {
$values = $form->exportValues();
$user = UserManager::getManager()->findUserByUsername($values['user']);
if ($user) {
UserManager::sendUserConfirmationMail($user);
} else {
Display::addFlash(Display::return_message(get_lang('UserDoesNotExist')));
}
UserManager::sendUserConfirmationMail($user);
header('Location: '.api_get_path(WEB_PATH));
exit;
}

Loading…
Cancel
Save