22 |
column password =>, |
column password =>, |
23 |
type is 'text', |
type is 'text', |
24 |
label is 'Password', |
label is 'Password', |
25 |
|
is mandatory, |
26 |
render_as 'password'; |
render_as 'password'; |
27 |
|
|
28 |
package Transports::Model::User; |
package Transports::Model::User; |
30 |
|
|
31 |
# Your model-specific methods go here. |
# Your model-specific methods go here. |
32 |
|
|
33 |
|
=head2 password_is STRING |
34 |
|
|
35 |
|
Returns true if and only if the current user's password matches STRING |
36 |
|
|
37 |
|
=cut |
38 |
|
|
39 |
|
|
40 |
|
sub password_is { |
41 |
|
my $self = shift; |
42 |
|
my $string = shift || return; |
43 |
|
warn "password_is ", $self->_value('password'), " == $string\n"; |
44 |
|
return 1 if ($self->_value('password') eq $string); |
45 |
|
return 0; |
46 |
|
} |
47 |
|
|
48 |
|
=head2 password |
49 |
|
|
50 |
|
Never display a password |
51 |
|
|
52 |
|
=cut |
53 |
|
|
54 |
|
#sub password { |
55 |
|
# return undef; |
56 |
|
#} |
57 |
|
|
58 |
1; |
1; |
59 |
|
|