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
}
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 {