Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
2ddd615f
Commit
2ddd615f
authored
Dec 08, 2014
by
Côme Bernigaud
Committed by
Benoit Mortier
Dec 08, 2014
Browse files
Fixes
#3508
There is some french in password recovery
parent
78aabdd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
html/class_passwordRecovery.inc
View file @
2ddd615f
...
...
@@ -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'
]))
{
...
...
@@ -629,7 +629,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
);
...
...
ihtml/themes/default/recovery.tpl
View file @
2ddd615f
...
...
@@ -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=
"
e
mail
_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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment