]> iEval git - gruntmaster-page.git/blame - lib/Plack/App/Gruntmaster/Auth.pm
Fix problem list display during contest
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster / Auth.pm
CommitLineData
8d725691
MG
1package Plack::App::Gruntmaster::Auth;
2
3use 5.014000;
4use strict;
5our $VERSION = '5999.000_001';
6
7use parent qw/Plack::Middleware::Auth::Complex/;
8
9sub call_register {
10 my ($self, $req) = @_;
11 return $self->bad_request('Parameter too long') if grep { length > 100 } $req->parameters->values;
12
13 $self->SUPER::call_register($req);
14}
15
16sub create_user {
17 my ($self, $parms) = @_;
18 my %parms = $parms->flatten;
19 my $sth = $self->{dbh}->prepare_cached('INSERT INTO users (id, name, email, phone, town, university, country, level, passphrase) VALUES (?,?,?,?,?,?,?,?,?)');
20 $sth->execute(@parms{qw/username name email phone town university country level/}, $self->hash_passphrase($parms{password}));
21}
22
231;
24__END__
This page took 0.050926 seconds and 4 git commands to generate.