Add a parameter to know if the mail was already sent in mail reset screens (#378)

This commit is contained in:
Clément Oudot 2011-11-04 11:09:08 +00:00
parent d903606d88
commit f13a3e0cfe
2 changed files with 3 additions and 2 deletions

View File

@ -30,6 +30,7 @@ $template->param( CHOICE_PARAM => $portal->{authChoiceParam} );
$template->param( CHOICE_VALUE => $portal->{_authChoice} );
$template->param( EXPMAILDATE => $portal->{expMailDate} );
$template->param( EXPMAILTIME => $portal->{expMailTime} );
$template->param( MAILALREADYSENT => $portal->{mail_already_sent} );
$template->param(
MAIL => $portal->checkXSSAttack( 'mail', $portal->{mail} )
? ""

View File

@ -191,10 +191,10 @@ sub sendConfirmationMail {
# Check if confirmation mail has already been sent
my $mail_session = $self->getMailSession( $self->{mail} );
my $mail_already_sent = ( $mail_session and !$self->{id} ) ? 1 : 0;
$self->{mail_already_sent} = ( $mail_session and !$self->{id} ) ? 1 : 0;
# Ask if user want another confirmation email
if ( $mail_already_sent and !$self->param('resendconfirmation') ) {
if ( $self->{mail_already_sent} and !$self->param('resendconfirmation') ) {
return PE_MAILCONFIRMATION_ALREADY_SENT;
}
else {