Revision d8ac0828
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
566 | 566 |
|
567 | 567 |
if (!$session_id) { |
568 | 568 |
$main::lxdebug->leave_sub(); |
569 |
return SESSION_NONE;
|
|
569 |
return $self->session_restore_result(SESSION_NONE());
|
|
570 | 570 |
} |
571 | 571 |
|
572 | 572 |
my ($dbh, $query, $sth, $cookie, $ref, $form); |
... | ... | |
576 | 576 |
# Don't fail if the auth DB doesn't yet. |
577 | 577 |
if (!( $dbh = $self->dbconnect(1) )) { |
578 | 578 |
$::lxdebug->leave_sub; |
579 |
return SESSION_NONE;
|
|
579 |
return $self->session_restore_result(SESSION_NONE());
|
|
580 | 580 |
} |
581 | 581 |
|
582 | 582 |
# Don't fail if the "auth" schema doesn't exist yet, e.g. if the |
... | ... | |
586 | 586 |
if (!($sth = $dbh->prepare($query)) || !$sth->execute($session_id)) { |
587 | 587 |
$sth->finish if $sth; |
588 | 588 |
$::lxdebug->leave_sub; |
589 |
return SESSION_NONE;
|
|
589 |
return $self->session_restore_result(SESSION_NONE());
|
|
590 | 590 |
} |
591 | 591 |
|
592 | 592 |
$cookie = $sth->fetchrow_hashref; |
... | ... | |
605 | 605 |
if ($cookie_is_bad) { |
606 | 606 |
$self->destroy_session(); |
607 | 607 |
$main::lxdebug->leave_sub(); |
608 |
return $cookie ? SESSION_EXPIRED : SESSION_NONE;
|
|
608 |
return $self->session_restore_result($cookie ? SESSION_EXPIRED() : SESSION_NONE());
|
|
609 | 609 |
} |
610 | 610 |
|
611 | 611 |
if ($self->{column_information}->has('auto_restore')) { |
... | ... | |
616 | 616 |
|
617 | 617 |
$main::lxdebug->leave_sub(); |
618 | 618 |
|
619 |
return SESSION_OK; |
|
619 |
return $self->session_restore_result(SESSION_OK()); |
|
620 |
} |
|
621 |
|
|
622 |
sub session_restore_result { |
|
623 |
my $self = shift; |
|
624 |
if (@_) { |
|
625 |
$self->{session_restore_result} = $_[0]; |
|
626 |
} |
|
627 |
return $self->{session_restore_result}; |
|
620 | 628 |
} |
621 | 629 |
|
622 | 630 |
sub _load_without_auto_restore_column { |
Auch abrufbar als: Unified diff
Admin: Teile von admin.pl in neuen Controller Admin verschoben; Mandanten anzeigen