1 |
use strict; |
use strict; |
2 |
use warnings; |
use warnings; |
3 |
|
|
4 |
package A3C::Model::User; |
package A3C::Model::Person; |
5 |
use Jifty::DBI::Schema; |
use Jifty::DBI::Schema; |
6 |
|
|
7 |
use utf8; |
use utf8; |
9 |
use A3C::Record schema { |
use A3C::Record schema { |
10 |
|
|
11 |
column uid => |
column uid => |
12 |
label is ('uid'), |
label is _('UID'), |
13 |
is indexed, |
is indexed, |
14 |
is mandatory, |
is mandatory, |
15 |
is distinct; |
is distinct; |
16 |
|
|
17 |
column hrEduPersonUniqueID => |
column hrEduPersonUniqueID => |
18 |
label is ('hrEduPersonUniqueID'), |
label is _('hr Edu Person Unique ID'), |
19 |
is indexed, |
is indexed, |
20 |
is distinct, |
is distinct, |
21 |
is mandatory; |
is mandatory; |
36 |
type is 'text', |
type is 'text', |
37 |
is mandatory, |
is mandatory, |
38 |
label is _('Email address'), default is '', |
label is _('Email address'), default is '', |
39 |
|
is indexed, |
40 |
is immutable, |
is immutable, |
41 |
is distinct; |
is distinct; |
42 |
|
|
154 |
], |
], |
155 |
default is ''; |
default is ''; |
156 |
|
|
157 |
column 'o'; |
column 'o' => |
158 |
|
is indexed; |
159 |
|
|
160 |
column 'l'; |
column 'l'; |
161 |
column 'postalAddress'; |
column 'postalAddress'; |
162 |
|
column 'postalCode'; |
163 |
|
column 'street'; |
164 |
|
|
165 |
# column organization => |
# column organization => |
166 |
# refers_to A3C::Model::Organization by 'id', |
# refers_to A3C::Model::Organization by 'id', |
338 |
|
|
339 |
sub email { |
sub email { |
340 |
my $self = shift; |
my $self = shift; |
341 |
return $self->__value('mail'); |
return $self->mail; |
342 |
} |
} |
343 |
|
|
344 |
sub email_confirmed { 1 }; |
sub email_confirmed { 1 }; |
349 |
|
|
350 |
sub name { |
sub name { |
351 |
my $self = shift; |
my $self = shift; |
352 |
return $self->__value('cn') . ' <' . $self->__value('mail') . '>'; |
return $self->cn . ' <' . $self->mail . '>'; |
353 |
} |
} |
354 |
|
|
355 |
=head2 validate_telephoneNumber |
=head2 validate_telephoneNumber |
421 |
return $value; |
return $value; |
422 |
} |
} |
423 |
|
|
424 |
=head2 current_user_can |
use A3C::DefaultACL; |
|
|
|
|
=cut |
|
|
|
|
|
sub current_user_can { |
|
|
# FIXME no security for now :-) |
|
|
return 1; |
|
|
} |
|
|
|
|
425 |
|
|
426 |
1; |
1; |
427 |
|
|