Revision 244
- Date:
- 2012/09/17 17:39:53
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/session/lib/session/Keeper.pm
43 43 status => $res->status, 44 44 ltime => time, 45 45 ); 46 my ($type_prop) = grep { $_->{attr} eq 'type' } $res->structure; 47 $data{type} = $res->type if $type_prop; 46 48 $self->store_value ( %data ); 47 49 } 48 50 return $self->get_session(); … … 81 83 } 82 84 83 85 86 sub autologon { 87 my $self = shift; 88 my %opts = @_; 89 90 my $profile = delete $opts{profile}; 91 if ( ref $profile ) { 92 my %data = ( 93 id => $profile->id, 94 name => $profile->name, 95 email => $profile->email, 96 login => $profile->login, 97 status => $profile->status, 98 ltime => time, 99 ); 100 my ($type_prop) = grep { $_->{attr} eq 'type' } $profile->structure; 101 $data{type} = $profile->type if $type_prop; 102 $self->store_value ( %data ); 103 return $self->get_session(); 104 } 105 return undef; 106 } 107 108 84 109 sub get_value { 85 110 86 111 my ($self, $name) = @_;