]> iEval git - plack-middleware-auth-complex.git/commitdiff
More croaks
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Mar 2015 12:23:25 +0000 (14:23 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 1 Mar 2015 12:23:25 +0000 (14:23 +0200)
lib/Plack/Middleware/Auth/Complex.pm

index 6ef8769f03c9075bc00c4f03000c5bcb042a23eb..057bfd7fbe96a343a8cb712a4e74555358829982 100644 (file)
@@ -59,12 +59,12 @@ sub init {
 sub create_user {
        my ($self, $parms) = @_;
        my %parms = $parms->flatten;
-       $self->{insert_sth}->execute($parms{username}, $self->hash_passphrase($parms{password}), $parms{email})
+       $self->{insert_sth}->execute($parms{username}, $self->hash_passphrase($parms{password}), $parms{email}) or croak $self->{insert_sth}->errstr;
 }
 
 sub get_user {
        my ($self, $user) = @_;
-       $self->{select_sth}->execute($user) or croak $self->{sth}->errstr;
+       $self->{select_sth}->execute($user) or croak $self->{select_sth}->errstr;
        $self->{select_sth}->fetchrow_hashref
 }
 
@@ -95,7 +95,7 @@ sub hash_passphrase {
 
 sub set_passphrase {
        my ($self, $username, $passphrase) = @_;
-       $self->{update_sth}->execute($self->hash_passphrase($passphrase), $username)
+       $self->{update_sth}->execute($self->hash_passphrase($passphrase), $username) or croak $self->{update_sth}->errstr;
 }
 
 sub make_reset_hmac {
This page took 0.026337 seconds and 4 git commands to generate.