/[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

Annotation of /lib/Arh/CurrentUser.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (hide annotations)
Thu Nov 29 17:17:16 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 630 byte(s)
added users/passowrds all over the place
1 dpavlin 10 use strict;
2     use warnings;
3    
4     package Arh::CurrentUser;
5     use base qw/Jifty::CurrentUser Arh::Model::User/;
6    
7     use Data::Dump qw/dump/;
8    
9     =head2 _init
10    
11     This function will load user data from database
12    
13     =cut
14    
15     sub _init {
16     my $self = shift;
17     my %args = (@_);
18    
19     if ( delete $args{'_bootstrap'} ) {
20     $self->is_bootstrap_user(1);
21     } elsif( keys %args ) {
22     my $u = Arh::Model::User->new;
23     $u->load_by_cols( %args );
24     if ( $u->id ) {
25     Jifty->log->info("loaded user ",dump( \%args ));
26     $self->user_object( $u );
27     } else {
28     Jifty->log->error("Can't load user ",dump( \%args ));
29     }
30     }
31    
32     # be superuser
33     #$self->is_superuser(1);
34    
35     }
36    
37    
38    
39     1;

  ViewVC Help
Powered by ViewVC 1.1.26