Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision de998cce

Von Moritz Bunkus vor fast 17 Jahren hinzugefügt

  • ID de998cce754a73341988441034e2649f3ded6c54
  • Vorgänger 0a3b8a76
  • Nachfolger 5d275ec4

Eine Session maximal acht Stunden inaktiv lassen.

Unterschiede anzeigen:

SL/Auth.pm
423 423
  $form   = $main::form;
424 424

  
425 425
  $dbh    = $self->dbconnect();
426
  $query  = qq|SELECT *, (mtime < (now() - '24h'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
426
  $query  = qq|SELECT *, (mtime < (now() - '8h'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
427 427

  
428 428
  $cookie = selectfirst_hashref_query($form, $dbh, $query, $session_id);
429 429

  
......
477 477
       WHERE session_id IN
478 478
         (SELECT id
479 479
          FROM auth.session
480
          WHERE (mtime < (now() - '24h'::interval)))|;
480
          WHERE (mtime < (now() - '8h'::interval)))|;
481 481

  
482 482
  do_query($main::form, $dbh, $query);
483 483

  
484 484
  $query =
485 485
    qq|DELETE FROM auth.session
486
       WHERE (mtime < (now() - '24h'::interval))|;
486
       WHERE (mtime < (now() - '8h'::interval))|;
487 487

  
488 488
  do_query($main::form, $dbh, $query);
489 489

  

Auch abrufbar als: Unified diff