Commit d7233a76 authored by Côme Bernigaud's avatar Côme Bernigaud Committed by Benoit Mortier
Browse files

Fixes #3508 There is some french in password recovery

parent 9479823d
......@@ -28,7 +28,7 @@ class passwordRecovery {
var $config;
var $uid;
var $message = array();
var $address_mail;
var $email_address;
var $method;
var $directory;
......@@ -133,12 +133,12 @@ class passwordRecovery {
}
}
if (isset($_GET['address_mail']) && $_GET['address_mail'] != "") {
$this->address_mail = validate($_GET['address_mail']);
$smarty->assign('address_mail', $this->address_mail);
} elseif (isset($_POST['address_mail'])) {
$this->address_mail = validate($_POST['address_mail']);
$smarty->assign('address_mail', $this->address_mail);
if (isset($_GET['email_address']) && $_GET['email_address'] != "") {
$this->email_address = validate($_GET['email_address']);
$smarty->assign('email_address', $this->email_address);
} elseif (isset($_POST['email_address'])) {
$this->email_address = validate($_POST['email_address']);
$smarty->assign('email_address', $this->email_address);
}
/* Check for selected user... */
......@@ -491,17 +491,17 @@ class passwordRecovery {
function step2()
{
/* Ask for the method */
if ($_POST['address_mail'] == "") {
$this->message[] = msgPool::required(_("Adresse mail"));
if ($_POST['email_address'] == "") {
$this->message[] = msgPool::required(_("Email address"));
return;
}
$this->address_mail = $_POST['address_mail'];
$this->email_address = $_POST['email_address'];
/* Search uid corresponding to the mail */
if ($this->usealternates) {
$filter = "(&(objectClass=gosaMailAccount)(|(mail=".$this->address_mail.")(gosaMailAlternateAddress=".$this->address_mail.")))";
$filter = "(&(objectClass=gosaMailAccount)(|(mail=".$this->email_address.")(gosaMailAlternateAddress=".$this->email_address.")))";
} else {
$filter = "(&(objectClass=gosaMailAccount)(mail=".$this->address_mail."))";
$filter = "(&(objectClass=gosaMailAccount)(mail=".$this->email_address."))";
}
$uids = get_list( $filter, "",
$this->config->current['BASE'], array("uid"),
......@@ -509,10 +509,10 @@ class passwordRecovery {
/* Only one uid should be found */
if (count($uids) < 1) {
$this->message[] = sprintf(_("There is no account using email %s"), $this->address_mail);
$this->message[] = sprintf(_("There is no account using email %s"), $this->email_address);
return;
} elseif (count($uids) > 1) {
$this->message[] = sprintf(_("There are several accounts using email %s"), $this->address_mail);
$this->message[] = sprintf(_("There are several accounts using email %s"), $this->email_address);
return;
}
......@@ -520,9 +520,9 @@ class passwordRecovery {
$this->uid = $uids[0]['uid'][0];
$smarty->assign('uid', $this->uid);
$smarty->assign('address_mail', $this->address_mail);
$smarty->assign('email_address', $this->email_address);
$this->step = 2;
$params = $this->encodeParams(array('uid', 'method', 'directory', 'address_mail'));
$params = $this->encodeParams(array('uid', 'method', 'directory', 'email_address'));
$smarty->assign('params', $params);
}
......@@ -544,7 +544,7 @@ class passwordRecovery {
$reinit_link = $this->getPageURL();
$reinit_link .= "?uniq=".$activatecode;
$reinit_link .= "&uid=".$this->uid;
$reinit_link .= "&address_mail=".$this->address_mail;
$reinit_link .= "&email_address=".$this->email_address;
@DEBUG(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $reinit_link, "Setting link to");
......@@ -557,7 +557,7 @@ class passwordRecovery {
$additional_parameters = "-f".$this->from_mail;
if (mail($this->address_mail, $this->mail_subject, $mail_body, $headers, $additional_parameters)) {
if (mail($this->email_address, $this->mail_subject, $mail_body, $headers, $additional_parameters)) {
$this->step = 3;
} else {
$this->message[] = msgPool::invalid(_("Contact your administrator, there was a problem with mail server"));
......@@ -581,7 +581,7 @@ class passwordRecovery {
$this->uniq = $uniq_id_from_mail;
$this->step = 4;
$smarty->assign('uid', $this->uid);
$params = $this->encodeParams(array('uid', 'method', 'directory', 'address_mail', 'uniq'));
$params = $this->encodeParams(array('uid', 'method', 'directory', 'email_address', 'uniq'));
$smarty->assign('params', $params);
if (isset($_POST['change'])) {
......@@ -615,7 +615,7 @@ class passwordRecovery {
$additional_parameters = "-f".$this->from_mail;
if (mail($this->address_mail, $this->mail2_subject, $mail_body, $headers, $additional_parameters)) {
if (mail($this->email_address, $this->mail2_subject, $mail_body, $headers, $additional_parameters)) {
$smarty = get_smarty();
$this->step = 5;
$smarty->assign('changed', TRUE);
......
......@@ -31,7 +31,7 @@
{if $step==2}
<p class="infotext">
{t}Password recovery for email {$address_mail}{/t}
{t}Password recovery for email {$email_address}{/t}
</p>
<p class="infotext">
......@@ -42,7 +42,7 @@
<li>{t}Receive by email a link that allows you to reset your password{/t} :
<input type="submit" name="send" value="{t}Send{/t}"
title="{t}Click here to send a reset link{/t}">
<input type="hidden" id="address_mail" maxlength="60" value="{$address_mail}">
<input type="hidden" id="email_address" maxlength="60" value="{$email_address}">
<input type="hidden" id="uid" maxlength="60" value="{$uid}">
</li>
{if $other_method}
......@@ -57,7 +57,7 @@
</p>
{elseif $step==3}
<p class="infotext">
{t}Informations to reset password for {$uid} have been sent to email address {$address_mail}{/t}<br/>
{t}Informations to reset password for {$uid} have been sent to email address {$email_address}{/t}<br/>
<div style="color:red;">{t}Warning : this email is only valid for {$delay_allowed} minutes.{/t}</div>
</p>
{elseif $step==4}
......@@ -104,7 +104,7 @@
<div class="change" style="float:right; text-align:right;">
<input type="submit" name="change" value="{t}Change{/t}" title="{t}Click here to change your password{/t}">
<input type="hidden" id="address_mail" maxlength="60" value="{$address_mail}">
<input type="hidden" id="email_address" maxlength="60" value="{$email_address}">
<input type="hidden" id="uniq" maxlength="60" value="{$uniq}">
<input type="hidden" id="formSubmit">
</div>
......@@ -133,9 +133,9 @@
</tr>
{/if}
<tr>
<td><label for="mail">{t}Adresse mail{/t}</label></td>
<td><label for="email_address">{t}Email address{/t}</label></td>
<td>
<input type="text" name="address_mail" id="address_mail" width="60" maxlength="60" value="{$address_mail}" title="{t}Mail{/t}" onFocus="">
<input type="text" name="email_address" id="email_address" width="60" maxlength="60" value="{$email_address}" title="{t}Mail{/t}" onFocus="">
</td>
</tr>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment