| Jifty documentation | Contained in the Jifty distribution. |
Jifty::Model::SessionCollection - Specialized handling of the session collection
This deals with collections of Jifty::Model::Sessions.
Everyone is treated as the superuser when dealing with session objects. This avoids infinite recursion, as otherwise it would try to look up the current user in the session object to find out who we are...
find sessions where updated time is expired.
find sessions where created time is expired.
| Jifty documentation | Contained in the Jifty distribution. |
use warnings; use strict; package Jifty::Model::SessionCollection; use base qw/Jifty::Collection/;
sub record_class { 'Jifty::Model::Session' }
sub current_user { return Jifty->app_class('CurrentUser')->superuser }
sub expired_update { my ($self,$dt) = @_; $self->limit( column => 'updated', operator => '<', value => $dt ); }
sub expired_create { my ($self,$dt) = @_; $self->limit( column => 'created', operator => '<', value => $dt, ); } 1;