Commit 7df46ae1 authored by Clément OUDOT's avatar Clément OUDOT

Change password in mail reset when it is generated (#1508)

parent d06a6fc9
Pipeline #3080 passed with stages
in 6 minutes and 28 seconds
......@@ -406,17 +406,17 @@ sub changePwd {
$self->ott->setToken( $req, $req->sessionInfo );
return PE_PASSWORDFORMEMPTY;
}
}
# Modify the password TODO: change this
# Populate $req->{user} for logging purpose
my $tmp = $self->conf->{portalRequireOldPassword};
$self->conf->{portalRequireOldPassword} = 0;
my $result = $self->p->_passwordDB->modifyPassword($req);
$req->{user} = undef;
# Modify the password TODO: change this
# Populate $req->{user} for logging purpose
my $tmp = $self->conf->{portalRequireOldPassword};
$self->conf->{portalRequireOldPassword} = 0;
my $result = $self->p->_passwordDB->modifyPassword($req);
$req->{user} = undef;
# Mail token can be used only one time, delete the session if all is ok
return $result unless ( $result == PE_PASSWORD_OK or $result == PE_OK );
}
# Mail token can be used only one time, delete the session if all is ok
return $result unless ( $result == PE_PASSWORD_OK or $result == PE_OK );
# Send mail containing the new password
$req->data->{mailAddress} ||=
......
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