<%args> $tab $id <%perl> use Masterkey::Admin; warn "setting up"; $m->comp("/mc/setup.mc"); warn "fetching user"; my $user = $m->comp("/mc/utils/user.mc"); warn "got user $user"; if (!defined $user) { print "How did you get here when you're not logged on?\n"; return; } warn "making new session n tab '$tab'"; # We need to make a session to that we can replace who it's logged in as my(undef, $session, undef) = new_with_session Masterkey::Admin($tab, $r, 1); warn "got new session -> $session"; warn "updating session's user"; my $count = $session->update(user_id => $id); warn "updated session to user_id=$id, changed-count=$count"; # ### We should have code here to handle authUserCookie, but we know # it won't arise because the tabs that you log into using "act # as" don't have that setting. warn "redirecting to ../$tab/"; <& /mc/redirect.html, url => "../$tab/" &>