Suggest that the user change their password at login if the password
is a four digit PIN. Do this by redirecting to the update_password
page with a CGI param to trigger an optional message.
Signed-off-by: Jeff Godin <jgodin@tadl.org>
}
}
+ # test for four-digit PIN as password -- suggest password change
+ if ($password =~ m/^\d{4}$/) {
+ my $update_password = sprintf(
+ 'https://%s%s/myopac/update_password?initial=1',
+ $self->apache->hostname, $self->ctx->{opac_root} );
+ return $self->generic_redirect($update_password, $cookies);
+ }
+
return $self->generic_redirect(
$cgi->param('redirect_to') || $acct, $cookies
);