Update session with pwd db (#595)
This commit is contained in:
parent
3e0d98c14f
commit
a802f60e6a
|
@ -181,7 +181,8 @@ sub getModule {
|
|||
}
|
||||
else {
|
||||
my $s = ref( $self->$mod );
|
||||
$s =~ s/^Lemonldap::NG::Portal::(?:(?:Issuer|UserDB|Auth)::)?//;
|
||||
$s =~
|
||||
s/^Lemonldap::NG::Portal::(?:(?:Issuer|UserDB|Auth|Password)::)?//;
|
||||
return $s;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,9 +49,20 @@ sub _modifyPassword {
|
|||
$self->lmLog( 'Update password in session for ' . $req->user, 'debug' );
|
||||
my $infos;
|
||||
|
||||
# TODO: verify newPassword ?
|
||||
$self->p->updateSession( { _password => $req->{newpassword} } )
|
||||
if ( $self->conf->{storePassword} );
|
||||
# Store new password if asked
|
||||
if ( $self->conf->{storePassword} ) {
|
||||
$self->p->updateSession(
|
||||
$req,
|
||||
{
|
||||
_passwordDB => $self->getModule( $req, 'password' ),
|
||||
_password => $req->{newpassword}
|
||||
}
|
||||
);
|
||||
}
|
||||
else {
|
||||
$self->p->updateSession( $req,
|
||||
{ _passwordDB => $self->getModule( $req, 'password' ) } );
|
||||
}
|
||||
|
||||
# Set a flag to ignore password change in Menu
|
||||
$req->{ignorePasswordChange} = 1;
|
||||
|
|
Loading…
Reference in New Issue