]>
iEval git - gruntmaster-data.git/blob - lib/Gruntmaster/Data/Result/User.pm
2 package Gruntmaster
::Data
::Result
::User
;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Gruntmaster::Data::Result::User
16 use base
'DBIx::Class::Core';
18 =head1 TABLE: C<users>
22 __PACKAGE__
->table("users");
79 __PACKAGE__
->add_columns(
81 { data_type
=> "text", is_nullable
=> 0 },
83 { data_type
=> "text", is_nullable
=> 1 },
85 { data_type
=> "boolean", default_value
=> \"false
", is_nullable => 0 },
87 { data_type => "text
", is_nullable => 1 },
89 { data_type => "text
", is_nullable => 1 },
91 { data_type => "text
", is_nullable => 1 },
93 { data_type => "text
", is_nullable => 1 },
95 { data_type => "text
", is_nullable => 1 },
97 { data_type => "text
", is_nullable => 1 },
99 { data_type => "bigint
", is_nullable => 1 },
112 __PACKAGE__->set_primary_key("id
");
116 =head2 contest_statuses
120 Related object: L<Gruntmaster::Data::Result::ContestStatus>
124 __PACKAGE__->has_many(
126 "Gruntmaster
::Data
::Result
::ContestStatus
",
127 { "foreign
.owner
" => "self
.id
" },
128 { cascade_copy => 0, cascade_delete => 0 },
135 Related object: L<Gruntmaster::Data::Result::Contest>
139 __PACKAGE__->has_many(
141 "Gruntmaster
::Data
::Result
::Contest
",
142 { "foreign
.owner
" => "self
.id
" },
143 { cascade_copy => 0, cascade_delete => 0 },
150 Related object: L<Gruntmaster::Data::Result::Job>
154 __PACKAGE__->has_many(
156 "Gruntmaster
::Data
::Result
::Job
",
157 { "foreign
.owner
" => "self
.id
" },
158 { cascade_copy => 0, cascade_delete => 0 },
165 Related object: L<Gruntmaster::Data::Result::Open>
169 __PACKAGE__->has_many(
171 "Gruntmaster
::Data
::Result
::Open
",
172 { "foreign
.owner
" => "self
.id
" },
173 { cascade_copy => 0, cascade_delete => 0 },
176 =head2 problem_statuses
180 Related object: L<Gruntmaster::Data::Result::ProblemStatus>
184 __PACKAGE__->has_many(
186 "Gruntmaster
::Data
::Result
::ProblemStatus
",
187 { "foreign
.owner
" => "self
.id
" },
188 { cascade_copy => 0, cascade_delete => 0 },
195 Related object: L<Gruntmaster::Data::Result::Problem>
199 __PACKAGE__->has_many(
201 "Gruntmaster
::Data
::Result
::Problem
",
202 { "foreign
.owner
" => "self
.id
" },
203 { cascade_copy => 0, cascade_delete => 0 },
207 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2014-12-11 23:51:27
208 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JcVHC/n8J+NgJge9LkckYA
210 use Authen::Passphrase;
211 use Authen::Passphrase::BlowfishCrypt;
213 sub check_passphrase {
214 my ($self, $pw) = @_;
215 Authen::Passphrase->from_rfc2307($self->passphrase)->match($pw)
219 my ($self, $pw) = @_;
220 $self->update({passphrase => Authen::Passphrase::BlowfishCrypt->new(
233 =head2 check_passphrase(I<$passphrase>)
235 Returns true if I<$passphrase> is the correct passphrase, false otherwise.
237 =head2 set_passphrase(I<$passphrase>)
239 Changes the passphrase to I<$passphrase>.
243 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
245 =head1 COPYRIGHT AND LICENSE
247 Copyright (C) 2014 by Marius Gavrilescu
249 This library is free software; you can redistribute it and/or modify
250 it under the same terms as Perl itself, either Perl version 5.18.1 or,
251 at your option, any later version of Perl 5 you may have available.
This page took 0.052775 seconds and 4 git commands to generate.