fix AuthMemCookie memcache removal
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 6 Dec 2011 20:07:38 +0000 (21:07 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 6 Dec 2011 20:07:38 +0000 (21:07 +0100)
C4/Auth.pm

index 8a05315..77b5364 100644 (file)
@@ -784,10 +784,11 @@ sub checkauth {
                        $userid = undef;
                }
         elsif ($logout) {
-               if ( my $token = $session->param('AuthMemCookie') ) {
+               if ( my $token = $query->cookie('AuthMemCookie') ) {
                        my $memd = new Cache::Memcached { 'servers' => [ '127.0.0.1:11211' ], 'compress_threshold' => 10_000 };
                        #$memd->set( $token => '' ); # invalidate AuthMemCookie and leave anonymous user logged in
                        $memd->delete( $token );
+                       warn "# nuked $token from memcache";
                }
 
             # voluntary logout the user