[Jifty-commit] r4622 - in jifty/trunk: lib/Jifty/Web

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Dec 5 20:15:31 EST 2007


Author: alexmv
Date: Wed Dec  5 20:15:31 2007
New Revision: 4622

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web/Session.pm

Log:
 r25455 at zoq-fot-pik:  chmrr | 2007-12-05 20:13:15 -0500
  * Code to actually fully remove a session


Modified: jifty/trunk/lib/Jifty/Web/Session.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Session.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Session.pm	Wed Dec  5 20:15:31 2007
@@ -237,6 +237,21 @@
     $setting->delete if $setting->id;
 }
 
+=head2 remove_all
+
+Removes the session from the database entirely.
+
+=cut
+
+sub remove_all {
+    my $self = shift;
+    return unless $self->loaded;
+    my $settings = Jifty::Model::SessionCollection->new;
+    $settings->limit( column => "session_id", value => $self->id );
+    $_->delete while $_ = $settings->next;
+    $self->unload;
+}
+
 =head2 set_continuation ID CONT
 
 Stores a continuation in the session.


More information about the Jifty-commit mailing list