Commit 9acbee90 authored by Leigh Stoller's avatar Leigh Stoller

Look for real user before guest user.

parent 32f09071
......@@ -262,9 +262,13 @@ if (!isset($create)) {
$sshkey = null;
#
# Look for cookie that tells us who the user is.
# Look for current user or cookie that tells us who the user is.
#
if (isset($_COOKIE['quickvm_user'])) {
if ($this_user) {
$username = $this_user->uid();
$email = $this_user->email();
}
elseif (isset($_COOKIE['quickvm_user'])) {
$geniuser = GeniUser::Lookup("sa", $_COOKIE['quickvm_user']);
if ($geniuser) {
#
......@@ -281,10 +285,6 @@ if (!isset($create)) {
$sshkey = $geniuser->SSHKey();
}
}
elseif ($this_user) {
$username = $this_user->uid();
$email = $this_user->email();
}
SPITFORM($username, $email, $sshkey, $profile, false, null);
SPITFOOTER();
return;
......
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