* The rest Copyright 2002-2004 (c) GForge Team
* http://gforge.org/
*
- * @version $Id$
- *
* This file is part of GForge.
*
* GForge is free software; you can redistribute it and/or modify
*/
-require_once('pre.php');
+require_once('../env.inc.php');
+require_once $gfwww.'include/pre.php';
if (getStringFromRequest('submit')) {
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
if (!$u || !is_object($u)){
form_release_key(getStringFromRequest('form_key'));
- exit_error($Language->getText('account_lostpw','invalid_user'),$Language->getText('account_lostpw','user_dont_exist'));
+ exit_error(_('Invalid user'),_('That user does not exist.'));
}
// First, we need to create new confirm hash
exit_error('Error',$u->getErrorMessage());
} else {
- $message = stripcslashes($Language->getText('account_lostpw', 'message', array(getStringFromServer('HTTP_HOST'), $confirm_hash, $GLOBALS['sys_name'])));
+ $message = stripcslashes(sprintf(_('Someone (presumably you) on the %1$s site requested a
+password change through email verification. If this was not you,
+ignore this message and nothing will happen.
+
+If you requested this verification, visit the following URL
+to change your password:
+
+<%2$s>
- util_send_message($u->getEmail(),$Language->getText('account_lostpw', 'subject', $GLOBALS['sys_name']),$message);
+ -- the %1$s staff
+'), $GLOBALS['sys_name'], util_make_url ("/account/lostlogin.php?ch=_".$confirm_hash)));
+
+ util_send_message($u->getEmail(),sprintf(_('%1$s Verification'), $GLOBALS['sys_name']),$message);
$HTML->header(array('title'=>"Lost Password Confirmation"));
- echo $Language->getText('account_lostpw','notify');
+ echo '<p>'.printf(_('An email has been sent to the address you have on file. Follow the instructions in the email to change your account password.').'</p><p><a href="%1$s">Home</a>', util_make_url ('/')).'</p>';
$HTML->footer(array());
exit();
$HTML->header(array('title'=>"Lost Account Password"));
-echo $Language->getText('account_lostpw','warn');
+echo _('<p>Hey... losing your password is serious business. It compromises the security of your account, your projects, and this site.</p><p>Clicking "Send Lost PW Hash" below will email a URL to the email address we have on file for you. In this URL is a 128-bit confirmation hash for your account. Visiting the URL will allow you to change your password online and login.</p>');
?>
<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>"/> <p>
-<?php echo $Language->getText('account_login', 'loginname'); ?>
+<?php echo _('Login name:'); ?>
<br />
<input type="text" name="loginname" />
<br />
<br />
-<input type="submit" name="submit" value="<?php echo $Language->getText('account_lostpw','sendhash'); ?>" />
+<input type="submit" name="submit" value="<?php echo _('Send Lost PW Hash'); ?>" />
</p>
</form>
-<p><a href="/"><?php echo $Language->getText('general', 'return', $GLOBALS['sys_name']); ?></a></p>
+ <p><?php echo util_make_link ("/", _('Return')); ?></p>
<?php
$HTML->footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>