Commit 2fd785d3 authored by Leigh Stoller's avatar Leigh Stoller

Oops, was not properly printing the urn of nonlocal users.

parent 92c4dff2
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006-2010 University of Utah and the Flux Group.
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# All rights reserved.
#
#
......@@ -251,6 +251,19 @@ class GeniUser
}
$this->dblink = $dblink;
$this->user = mysql_fetch_array($query_result);
#
# And get the urn.
#
$uuid = $this->user['uuid'];
$query_result =
DBQueryWarn("select urn from geni_certificates where uuid='$uuid'",
$dblink);
if ($query_result && mysql_num_rows($query_result)) {
$foo = mysql_fetch_array($query_result);
$this->user['urn'] = $foo['urn'];
return;
}
}
# Hmm, how does one cause an error in a php constructor?
......@@ -273,6 +286,7 @@ class GeniUser
}
function idx() { return $this->field('idx'); }
function hrn() { return $this->field('hrn'); }
function urn() { return $this->field('urn'); }
function uuid() { return $this->field('uuid'); }
function exptidx() { return $this->field('exptidx'); }
function created() { return $this->field('created'); }
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -81,7 +81,7 @@ if ($experiment) {
$geniuser = GeniUser::Lookup($showtype, $slice->creator_uuid());
if ($geniuser) {
$rows[] = array("Creator" => $geniuser->hrn());
$rows[] = array("Creator" => $geniuser->urn());
}
else {
$user = User::LookupByUUID($slice->creator_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