Commit 8bd8db4e authored by Leigh Stoller's avatar Leigh Stoller

Use new CheckLoginOrRedirect() function.

parent c7ff2750
......@@ -32,11 +32,7 @@ $page_title = "My Profiles";
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_user = CheckLoginOrRedirect();
SPITHEADER(1);
if (!ISADMIN()) {
......
......@@ -31,7 +31,7 @@ $page_title = "Approve User";
# Get current user in case we need an error message.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
$this_user = CheckLoginOrRedirect();
#
# Verify page arguments.
......
......@@ -31,7 +31,7 @@ $dblink = GetDBLink("sa");
#
# Get current user.
#
$this_user = CheckLogin($check_status);
$this_user = CheckLoginOrRedirect();
#
# Verify page arguments.
......
......@@ -30,7 +30,8 @@ include("quickvm_sup.php");
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
$this_user = CheckLoginOrRedirect();
$this_idx = $this_user->uid_idx();
#
# Verify page arguments.
......@@ -38,15 +39,6 @@ $this_user = CheckLogin($check_status);
$optargs = OptionalPageArguments("invite", PAGEARG_STRING,
"formfields", PAGEARG_ARRAY);
#
# The user must be logged in.
#
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_idx = $this_user->uid_idx();
#
# Spit the form
#
......
......@@ -38,7 +38,8 @@ $notifyclone = 0;
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
$this_user = CheckLoginOrRedirect();
$this_idx = $this_user->uid_idx();
#
# Verify page arguments.
......@@ -50,15 +51,6 @@ $optargs = OptionalPageArguments("create", PAGEARG_STRING,
"finished", PAGEARG_BOOLEAN,
"formfields", PAGEARG_ARRAY);
#
# The user must be logged in.
#
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_idx = $this_user->uid_idx();
#
# Spit the form
#
......
......@@ -41,11 +41,8 @@ $optargs = OptionalPageArguments("target_user", PAGEARG_USER,
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_user = CheckLoginOrRedirect();
if (!isset($target_user)) {
$target_user = $this_user;
}
......
......@@ -37,11 +37,8 @@ $optargs = OptionalPageArguments("target_user", PAGEARG_USER,
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_user = CheckLoginOrRedirect();
if (!isset($target_user)) {
$target_user = $this_user;
}
......
......@@ -37,11 +37,8 @@ $reqargs = RequiredPageArguments("uuid", PAGEARG_STRING);
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_user = CheckLoginOrRedirect();
SPITHEADER(1);
$profile = Profile::Lookup($uuid);
......
......@@ -37,11 +37,8 @@ $reqargs = RequiredPageArguments("uuid", PAGEARG_STRING);
# Get current user.
#
RedirectSecure();
$this_user = CheckLogin($check_status);
if (!$this_user) {
RedirectLoginPage();
exit();
}
$this_user = CheckLoginOrRedirect();
SPITHEADER(1);
$profile = Profile::Lookup($uuid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment