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 199edfa1 authored by Leigh B Stoller's avatar Leigh B Stoller

Small bug fixes to catch users who are still have experiments.

parent 5e723b45
<?php
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -132,7 +132,7 @@ else {
#
$experimentlist =
$target_user->ExperimentList(1, ((isset($target_project)) ?
$target_project->DefaultGroup() : null));
$target_project : null));
if (count($experimentlist)) {
echo "<center><h3>
......
......@@ -1435,16 +1435,22 @@ class User
#
# Return list of experiments for a user, or just a count.
#
function ExperimentList($listify = 1, $group = null) {
function ExperimentList($listify = 1, $target = null) {
$uid_idx = $this->uid_idx();
$gclause = "";
# within optional group only.
if ($group) {
$pid = $group->pid();
$gid = $group->gid();
$gclause = "and pid='$pid' and gid='$gid'";
}
if ($target) {
if (get_class($target) == "Group") {
$pid = $target->pid();
$gid = $target->gid();
$gclause = "and pid='$pid' and gid='$gid'";
}
else {
$pid = $target->pid();
$gclause = "and pid='$pid'";
}
}
$query_result =
DBQueryFatal("select idx from experiments ".
......
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