. # # }}} # include("defs.php3"); # # Only known and logged in users allowed. # $this_user = CheckLoginOrDie(); if (!ISADMIN()) { USERERROR("You do not have permission to do this!", 1); } # # Verify arguments. # $reqargs = RequiredPageArguments("target_user", PAGEARG_USER); $target_uid = $target_user->uid(); if (DOLOGIN_MAGIC($target_user->uid(), $target_user->uid_idx()) < 0) { USERERROR("Could not log you in as $target_uid", 1); } # So the menu and headers get spit out properly. $_COOKIE[$TBNAMECOOKIE] = $target_uid; PAGEHEADER("SU as User"); echo "
"; echo "

"; echo "You are now logged in as $target_uid\n"; echo "

"; echo "Be Careful!\n"; echo "
"; sleep(2); PAGEREPLACE($TBBASE); # # Standard Testbed Footer # PAGEFOOTER(); ?>