All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit eaf135e5 authored by Leigh B Stoller's avatar Leigh B Stoller

Oops, forgot to commit the landing page changes.

parent 0aee91f8
<?php
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -27,6 +27,7 @@ include_once("geni_defs.php");
chdir("apt");
include("quickvm_sup.php");
include_once("instance_defs.php");
include_once("profile_defs.php");
#
# Get current user but make sure coming in on SSL.
......@@ -58,6 +59,9 @@ if ($this_user) {
elseif (Instance::UserHasInstances($this_user)) {
header("Location: $APTBASE/user-dashboard.php");
}
elseif (Profile::UserHasProfiles($this_user)) {
header("Location: $APTBASE/user-dashboard.php#profiles");
}
else {
header("Location: $APTBASE/instantiate.php");
}
......
<?php
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -54,5 +54,5 @@ if ($ajax_request) {
SPITAJAX_RESPONSE("");
exit();
}
header("Location: instantiate.php");
header("Location: landing.php");
?>
......@@ -264,6 +264,16 @@ class Profile
return 0;
}
function UserHasProfiles($user) {
$uid = $user->uid();
$query_result =
DBQueryFatal("select profileid from apt_profile_versions ".
"where creator='$uid' and deleted is null");
return mysql_num_rows($query_result);
}
#
# URL. To the specific version of the profile.
#
......
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