Revision 315
- Date:
- 2013/04/24 19:21:22
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/users/lib/users/Keeper.pm
56 56 return unless ref $profile; 57 57 58 58 my $result; 59 # warn "Password = ".$opts{passwd}."; Pass MD5 = $passmd5; user MD5 = ".$res->passwd."\n" if $DEBUG; 59 warn "Password = $password; Pass MD5 = $passmd5; user MD5 = ".$profile->passwd."\n" if $DEBUG; 60 60 if ($profile->passwd eq $passmd5 ) { 61 61 my ($prop) = grep { $_->{attr} eq 'lastlogin' } $profile->structure; 62 62 if ( ref $prop ) { 63 63 my $now = Contenido::DateTime->new; 64 64 $profile->lastlogin( $now->ymd('-').' '.$now->hms ); 65 $profile->store; 65 # $profile->store; 66 66 } 67 warn "\nLogin successful\n" if $DEBUG; 67 68 return $profile; 68 69 } else { 70 warn "\nLogin [UN]successful\n" if $DEBUG; 69 71 return undef; 70 72 } 71 73 } -
utf8/plugins/users/lib/users/UserProfile.pm
336 336 { 337 337 my $self = shift; 338 338 339 my $up = $self->{keeper}->get_document_by_id ( $self->id, 340 class => $self->class, 341 ); 342 339 my $passwd_prev = $self->{passwd_prev} || ''; 343 340 if ( $self->passwd && $self->passwd ne $passwd_prev ) { 344 341 warn "Pass = ".$self->passwd."\n" if $DEBUG; … … 353 350 if ( $state->{users}->use_credentials ) { 354 351 foreach my $prop ( $self->structure ) { 355 352 my $name = $prop->{attr}; 356 if ( ref $self->$name =~ /^users::OA::/ ) { 357 my $obj = $self->$name; 353 if ( ref $self->{$name} =~ /^users::OA::/ ) { 354 my $obj = $self->{$name}; 358 355 $self->$name( $obj->ext_id ); 359 } elsif ( ref $self->$name =~ /^users::/ ) { 360 my $obj = $self->$name; 356 } elsif ( ref $self->{$name} =~ /^users::/ ) { 357 my $obj = $self->{$name}; 361 358 $self->$name( $obj->name ); 362 359 } 363 360 } … … 379 376 $self->sections($default_section); 380 377 } 381 378 } 382 383 379 return 1; 384 380 } 385 381