]>
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
");
120 Related object: L<Gruntmaster::Data::Result::Contest>
124 __PACKAGE__->has_many(
126 "Gruntmaster
::Data
::Result
::Contest
",
127 { "foreign
.owner
" => "self
.id
" },
128 { cascade_copy => 0, cascade_delete => 0 },
135 Related object: L<Gruntmaster::Data::Result::Job>
139 __PACKAGE__->has_many(
141 "Gruntmaster
::Data
::Result
::Job
",
142 { "foreign
.owner
" => "self
.id
" },
143 { cascade_copy => 0, cascade_delete => 0 },
150 Related object: L<Gruntmaster::Data::Result::Open>
154 __PACKAGE__->has_many(
156 "Gruntmaster
::Data
::Result
::Open
",
157 { "foreign
.owner
" => "self
.id
" },
158 { cascade_copy => 0, cascade_delete => 0 },
165 Related object: L<Gruntmaster::Data::Result::Problem>
169 __PACKAGE__->has_many(
171 "Gruntmaster
::Data
::Result
::Problem
",
172 { "foreign
.owner
" => "self
.id
" },
173 { cascade_copy => 0, cascade_delete => 0 },
177 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-05-16 15:23:08
178 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Cho4zmn58Mytf2jHvgP+4g
180 use Authen::Passphrase;
181 use Authen::Passphrase::BlowfishCrypt;
183 sub check_passphrase {
184 my ($self, $pw) = @_;
185 Authen::Passphrase->from_rfc2307($self->passphrase)->match($pw)
189 my ($self, $pw) = @_;
190 $self->update({passphrase => Authen::Passphrase::BlowfishCrypt->new(
203 =head2 check_passphrase(I<$passphrase>)
205 Returns true if I<$passphrase> is the correct passphrase, false otherwise.
207 =head2 set_passphrase(I<$passphrase>)
209 Changes the passphrase to I<$passphrase>.
213 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
215 =head1 COPYRIGHT AND LICENSE
217 Copyright (C) 2014 by Marius Gavrilescu
219 This library is free software; you can redistribute it and/or modify
220 it under the same terms as Perl itself, either Perl version 5.18.1 or,
221 at your option, any later version of Perl 5 you may have available.
This page took 0.067892 seconds and 4 git commands to generate.