/[A3C]/lib/A3C/Model/User.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/Model/User.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 16 by dpavlin, Thu Mar 13 18:07:28 2008 UTC revision 23 by dpavlin, Mon Mar 17 13:02:50 2008 UTC
# Line 17  use A3C::Record schema { Line 17  use A3C::Record schema {
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 =>
24                  label is _('Ime'),                  label is _('Ime i prezime'),
25                  type is 'virtual';                  type is 'virtual';
26    
27          column sn =>          column sn =>
# Line 40  use A3C::Record schema { Line 35  use A3C::Record schema {
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,
# Line 308  use A3C::Record schema { Line 298  use A3C::Record schema {
298          column hrEduPersonPrivacy =>          column hrEduPersonPrivacy =>
299                  label is _('Oznaka privatnosti');                  label is _('Oznaka privatnosti');
300    
301            column loginShell =>
302                    label is _('shell');
303    
304            column uidNumber =>
305                    label is _('uid'),
306                    type is 'int';
307    
308            column gidNumber =>
309                    label is _('gid');
310                    type is 'int';
311    
312            column homeDirectory =>
313                    label is _('home');
314    
315            column objectClass =>
316                    type is 'virtual';
317    
318  };  };
319    
320  use Jifty::Plugin::User::Mixin::Model::User;  # we don't use following mixing because it wants to send notificaitons on e-mail address change
321    #use Jifty::Plugin::User::Mixin::Model::User;
322  use Jifty::Plugin::Authentication::Password::Mixin::Model::User;  use Jifty::Plugin::Authentication::Password::Mixin::Model::User;
323  #use Jifty::Plugin::OpenID::Mixin::Model::User;  #use Jifty::Plugin::OpenID::Mixin::Model::User;
324  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
325    
326  # Your model-specific methods go here.  # Your model-specific methods go here.
327    
328  =head2 set_mail  =head2 before_create
329    
330  Put mail from ldap into email row  Implement virtual columns, for now put mail from ldap into email row
331    
332  =cut  =cut
333    
334  sub set_mail {  =for later
335          my ($self,$v) = @_;  
336          $self->set_email( $v );  sub before_create {
337            my ($self, $attr) = @_;
338            if ( ! $attr->{'email'} ) {
339                    warn "push mail to email";
340                    $attr->{'email'} = $attr->{'mail'};
341            }
342  }  }
343    
344    =cut
345    
346    =head2 email
347    
348    Accessor for compatibility with Jifty mixins
349    
350    =cut
351    
352    sub email {
353            my $self = shift;
354            return $self->__value('mail');
355    }
356    
357    sub email_confirmed { 1 };
358    
359  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber
360    
361  =cut  =cut

Legend:
Removed from v.16  
changed lines
  Added in v.23

  ViewVC Help
Powered by ViewVC 1.1.26