diff options
Diffstat (limited to 'lib/CatDap/Controller/register.pm')
-rw-r--r-- | lib/CatDap/Controller/register.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/register.pm b/lib/CatDap/Controller/register.pm index 24ceb53..a321bdd 100644 --- a/lib/CatDap/Controller/register.pm +++ b/lib/CatDap/Controller/register.pm @@ -78,7 +78,6 @@ sub check : Local { $mesg = $c->model('Proxy')->search("(uid=$username)"); if ($mesg->entries()) { push @errors,$c->loc('An account already exists with this username'); - push @errors; } if (@errors) { @@ -91,6 +90,7 @@ sub check : Local { my $ug = Data::UUID->new; my $password = $ug->create_str(); my $cn = $c->request->params->{gn} . " " . $c->request->params->{sn}; + $c->log->info("Creating account for user $username"); $mesg = $c->model('Proxy')->add($dn, attr => [ objectclass => [ 'inetOrgPerson' ], @@ -104,6 +104,7 @@ sub check : Local { ); if ($mesg) { push @errors,$mesg->error; + $c->log->info( sprintf("Creating DN $dn failed: %s", $mesg->error) ); $c->stash(errors => \@errors); #$c->stash(template => 'register/index.tt'); } @@ -130,9 +131,11 @@ EOF body => $body, }; + $c->log->info("Sending activation mail for user $username to $email"); $c->forward( $c->view('Email') ); if ( @{ $c->error } ) { my $errors = join "\n",@{ $c->error }; + $c->log->info("Sending activation mail to $email failed: $errors"); $c->response->body($c->loc('An error occured sending the email, but your account was created. Please try the password recovery process f you entered the correct email address: [_1]', $errors)); $c->error(0); # Reset the error condition if you need to } |