17 |
column hrEduPersonUniqueID => |
column hrEduPersonUniqueID => |
18 |
label is ('hrEduPersonUniqueID'), |
label is ('hrEduPersonUniqueID'), |
19 |
is indexed, |
is indexed, |
20 |
is mandatory, |
is distinct, |
|
is distinct; |
|
|
|
|
|
column name => |
|
|
type is 'text', |
|
|
label is _('Ime'), |
|
21 |
is mandatory; |
is mandatory; |
22 |
|
|
23 |
column cn => |
column cn => |
35 |
is mandatory; |
is mandatory; |
36 |
|
|
37 |
column mail => |
column mail => |
|
type is 'virtual'; |
|
|
|
|
|
column email => |
|
38 |
type is 'text', |
type is 'text', |
39 |
is mandatory, |
is mandatory, |
40 |
label is _('Email address'), default is '', is immutable, is distinct; |
label is _('Email address'), default is '', |
41 |
|
is immutable, |
42 |
column email_confirmed => |
is distinct; |
|
label is _('Email address confirmed?'), |
|
|
type is 'boolean'; |
|
43 |
|
|
44 |
column password => |
column password => |
45 |
is unreadable, |
is unreadable, |
300 |
|
|
301 |
}; |
}; |
302 |
|
|
303 |
use Jifty::Plugin::User::Mixin::Model::User; |
# we don't use following mixing because it wants to send notificaitons on e-mail address change |
304 |
|
#use Jifty::Plugin::User::Mixin::Model::User; |
305 |
use Jifty::Plugin::Authentication::Password::Mixin::Model::User; |
use Jifty::Plugin::Authentication::Password::Mixin::Model::User; |
306 |
#use Jifty::Plugin::OpenID::Mixin::Model::User; |
#use Jifty::Plugin::OpenID::Mixin::Model::User; |
307 |
use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on |
use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on |
308 |
|
|
309 |
# Your model-specific methods go here. |
# Your model-specific methods go here. |
310 |
|
|
311 |
=head2 set_mail |
=head2 before_create |
312 |
|
|
313 |
Put mail from ldap into email row |
Implement virtual columns, for now put mail from ldap into email row |
314 |
|
|
315 |
=cut |
=cut |
316 |
|
|
317 |
sub set_mail { |
=for later |
318 |
my ($self,$v) = @_; |
|
319 |
$self->set_email( $v ); |
sub before_create { |
320 |
|
my ($self, $attr) = @_; |
321 |
|
if ( ! $attr->{'email'} ) { |
322 |
|
warn "push mail to email"; |
323 |
|
$attr->{'email'} = $attr->{'mail'}; |
324 |
|
} |
325 |
} |
} |
326 |
|
|
327 |
|
=cut |
328 |
|
|
329 |
|
=head2 email |
330 |
|
|
331 |
|
Accessor for compatibility with Jifty mixins |
332 |
|
|
333 |
|
=cut |
334 |
|
|
335 |
|
sub email { |
336 |
|
my $self = shift; |
337 |
|
return $self->__value('mail'); |
338 |
|
} |
339 |
|
|
340 |
|
sub email_confirmed { 1 }; |
341 |
|
|
342 |
=head2 validate_telephoneNumber |
=head2 validate_telephoneNumber |
343 |
|
|
344 |
=cut |
=cut |