/[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 29 by dpavlin, Tue Mar 18 16:15:16 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';                  is mandatory;
26    
27          column sn =>          column sn =>
                 type is 'virtual',  
28                  label is _('Prezime'),                  label is _('Prezime'),
29                  is mandatory;                  is mandatory;
30    
31          column givenName =>          column givenName =>
                 type is 'virtual',  
32                  label is _('Ime'),                  label is _('Ime'),
33                  is mandatory;                  is mandatory;
34    
35          column mail =>          column mail =>
                 type is 'virtual';  
   
         column email =>  
36                  type is 'text',                  type is 'text',
37                  is mandatory,                  is mandatory,
38                  label is _('Email address'), default is '', is immutable, is distinct;                  label is _('Email address'), default is '',
39                    is immutable,
40          column email_confirmed =>                  is distinct;
                 label is _('Email address confirmed?'),  
                 type is 'boolean';  
41    
42          column password =>          column password =>
43                  is unreadable,                  is unreadable,
# Line 308  use A3C::Record schema { Line 296  use A3C::Record schema {
296          column hrEduPersonPrivacy =>          column hrEduPersonPrivacy =>
297                  label is _('Oznaka privatnosti');                  label is _('Oznaka privatnosti');
298    
299            column loginShell =>
300                    label is _('shell');
301    
302            column uidNumber =>
303                    label is _('uid'),
304                    type is 'int';
305    
306            column gidNumber =>
307                    label is _('gid');
308                    type is 'int';
309    
310            column homeDirectory =>
311                    label is _('home');
312    
313  };  };
314    
315  use Jifty::Plugin::User::Mixin::Model::User;  # we don't use following mixing because it wants to send notificaitons on e-mail address change
316    #use Jifty::Plugin::User::Mixin::Model::User;
317  use Jifty::Plugin::Authentication::Password::Mixin::Model::User;  use Jifty::Plugin::Authentication::Password::Mixin::Model::User;
318  #use Jifty::Plugin::OpenID::Mixin::Model::User;  #use Jifty::Plugin::OpenID::Mixin::Model::User;
319  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
320    
321  # Your model-specific methods go here.  # Your model-specific methods go here.
322    
323  =head2 set_mail  =head2 before_create
324    
325  Put mail from ldap into email row  Implement virtual columns, for now put mail from ldap into email row
326    
327  =cut  =cut
328    
329  sub set_mail {  =for later
330          my ($self,$v) = @_;  
331          $self->set_email( $v );  sub before_create {
332            my ($self, $attr) = @_;
333            if ( ! $attr->{'email'} ) {
334                    warn "push mail to email";
335                    $attr->{'email'} = $attr->{'mail'};
336            }
337  }  }
338    
339    =cut
340    
341    =head2 email
342    
343    Accessor for compatibility with Jifty mixins
344    
345    =cut
346    
347    sub email {
348            my $self = shift;
349            return $self->__value('mail');
350    }
351    
352    sub email_confirmed { 1 };
353    
354  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber
355    
356  =cut  =cut

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

  ViewVC Help
Powered by ViewVC 1.1.26