diff options
author | Buchan Milne <buchan@mageia.org> | 2010-10-28 10:59:32 +0000 |
---|---|---|
committer | Buchan Milne <buchan@mageia.org> | 2010-10-28 10:59:32 +0000 |
commit | 8634efae41f85cd8bf7560a3f12f6474f835cfe1 (patch) | |
tree | 7c2c14974481836c36d9776d7c9da12013daec20 /lib | |
parent | 45f7611e07bdf606b93040b2a075fd72759d44e0 (diff) | |
download | identity-8634efae41f85cd8bf7560a3f12f6474f835cfe1.tar identity-8634efae41f85cd8bf7560a3f12f6474f835cfe1.tar.gz identity-8634efae41f85cd8bf7560a3f12f6474f835cfe1.tar.bz2 identity-8634efae41f85cd8bf7560a3f12f6474f835cfe1.tar.xz identity-8634efae41f85cd8bf7560a3f12f6474f835cfe1.zip |
Add more useful logging, remove some more debug logging
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CatDap/Controller/register.pm | 5 | ||||
-rw-r--r-- | lib/CatDap/Controller/user.pm | 1 |
2 files changed, 4 insertions, 2 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 } diff --git a/lib/CatDap/Controller/user.pm b/lib/CatDap/Controller/user.pm index 41fe412..0603217 100644 --- a/lib/CatDap/Controller/user.pm +++ b/lib/CatDap/Controller/user.pm @@ -46,7 +46,6 @@ sub auto : Private { my $mesg; my $dn; my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address); - $c->log->info("Using $keyprefix as first part of enc key"); if (! defined $c->user) { $c->log->info("No session, logging user in"); if (! $c->authenticate({ username => $c->req->param('username'), |