/[Arh]/lib/Arh/CurrentUser.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/Arh/CurrentUser.pm

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

revision 22 by dpavlin, Thu Nov 29 19:04:56 2007 UTC revision 23 by dpavlin, Fri Nov 30 23:23:14 2007 UTC
# Line 22  sub _init { Line 22  sub _init {
22                  $self->is_bootstrap_user(1);                  $self->is_bootstrap_user(1);
23          }          }
24                    
25            my $u = Arh::Model::User->new;
26    
27          if ( keys %args ) {          if ( keys %args ) {
                 my $u = Arh::Model::User->new;  
28                  $u->load_by_cols( %args );                  $u->load_by_cols( %args );
29                  if ( $u->id ) {                  if ( $u->id ) {
30                          Jifty->log->info("loaded user ",dump( \%args ));                          Jifty->log->info("loaded user ",dump( \%args ));
                         $self->user_object( $u );  
31                  } else {                  } else {
32                          Jifty->log->error("Can't load user ",dump( \%args ));                          Jifty->log->error("Can't load user ",dump( \%args ));
33                  }                  }
34          }          }
35    
36            $self->user_object( $u );
37    
38          # be superuser          # be superuser
39          #$self->is_superuser(1);          #$self->is_superuser(1);
40    
# Line 40  sub _init { Line 42  sub _init {
42    
43  }  }
44    
45    sub editing {
46            my $self = shift;
47            die unless $self->current_user->user_object;
48            return $self->current_user->user_object->editing;
49    }
50    
51  1;  1;

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

  ViewVC Help
Powered by ViewVC 1.1.26