Jifty::Model::SessionCollection - Specialized handling of the session collection


Jifty documentation Contained in the Jifty distribution.

Index


Code Index:

NAME

Top

Jifty::Model::SessionCollection - Specialized handling of the session collection

METHODS

record_class

This deals with collections of Jifty::Model::Sessions.

current_user

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...

expired_update

find sessions where updated time is expired.

expired_create

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;