diff options
Diffstat (limited to 'lib/CatDap')
-rw-r--r-- | lib/CatDap/Controller/forgot_password.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/forgot_password.pm b/lib/CatDap/Controller/forgot_password.pm index 07589a3..47d81b4 100644 --- a/lib/CatDap/Controller/forgot_password.pm +++ b/lib/CatDap/Controller/forgot_password.pm @@ -56,7 +56,10 @@ sub check : Local { $emailfilter =~ s/\%s/$email/g, $c->log->debug("Searching for email $email with filter $emailfilter"); my $mesg = $c->model('Proxy')->search($emailfilter); - if (!$mesg->entries()) { + + $c->log->info(printf("Search failed: %s"),$mesg->error) if ($mesg->code); + my @entries = $mesg->entries; + if (@entries != 1) { push @errors,$c->loc( 'This email address is not bound to an account' ); @@ -86,6 +89,7 @@ sub check : Local { 'template' => 'forgot_password.tt', }, url => $c->uri_for('/forgot_password/confirm') . "?secret=$secret", + cn => @entries[0]->cn, ); $c->log->info("Sending forgot password mail to email address $email"); |