kill_all_sessions; delete $COOKIE{'BMLschemepref'}; BML::set_scheme(undef); $body = $ML{'.loggedout.killedall'}; return; } if ($u->{'_session'} && $user eq $u->{'user'} && $sessid == $u->{'_session'}->{'sessid'}) { $u->kill_session; delete $COOKIE{'BMLschemepref'}; BML::set_scheme(undef); $body = "$ML{'.loggedout.success'}"; # Redirect to offsite uri if allowed. if ($POST{'ret'}) { my $redir_host = $1 if $POST{'ret'} =~ m#^http://([\.:\w-]+)#i; return BML::redirect($POST{'ret'}) if $LJ::REDIRECT_ALLOWED{$redir_host}; } return; } $body .= "
"; # do they have any other sessions? my $udbr = LJ::get_cluster_reader($u); unless ($udbr) { $body = ""; return undef; } my $curid = $u->{'_session'}->{'sessid'} || 0; my $sessions = $udbr->selectcol_arrayref("SELECT sessid FROM sessions WHERE ". "userid=$u->{'userid'} AND timeexpire > UNIX_TIMESTAMP() ". "AND sessid <> $curid"); if (@$sessions) { $body .= ""; } return; } _code?> body=> page?>