3 * Resend account activation email with confirmation URL
5 * Copyright 1999-2001 (c) VA Linux Systems
6 * Copyright 2010-2013, Franck Villaume - TrivialDev
7 * Copyright 2013, French Ministry of National Education
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 require_once '../env.inc.php';
26 require_once $gfcommon.'include/pre.php';
28 if (getStringFromRequest('submit')) {
29 $loginname = trim(getStringFromRequest('loginname'));
30 if (!strlen($loginname)) {
31 $error_msg = _('Missing Parameter. You must provide a login name or an email address.');
33 $u = user_get_object_by_name($loginname);
34 if (!$u && forge_get_config('require_unique_email')) {
35 $u = user_get_object_by_email($loginname);
37 if (!$u || !is_object($u)) {
38 $error_msg = _('That user does not exist.');
39 } elseif ($u->isError()) {
40 $error_msg = $u->getErrorMessage();
41 } elseif ($u->getStatus() != 'P') {
42 $warning_msg = _('Your account is already active.');
44 $u->sendRegistrationEmail();
45 $HTML->header(array('title'=>_('Pending Account')));
46 echo '<p>'. _('Your email confirmation has been resent. Visit the link in this email to complete the registration process.'). '</p>';
47 $HTML->footer(array());
53 $HTML->header(array('title'=>_('Resend confirmation email to a pending account')));
55 if (forge_get_config('require_unique_email')) {
56 echo _('Fill in a user name or email address and click “Submit” to resend the confirmation email.');
58 echo _('Fill in a user name and click “Submit” to resend the confirmation email.');
62 <form action="<?php echo util_make_url('/account/pending-resend.php'); ?>" method="post">
64 if (forge_get_config('require_unique_email')) {
65 echo _('Login name or email address')._(':');
67 echo _('Login Name')._(':');
71 <label for="loginname">
72 <input id="loginname" required="required" type="text" name="loginname"/>
75 <p><input type="submit" name="submit" value="<?php echo _('Submit'); ?>" /></p>
78 <?php $HTML->footer(array());