Commit ac678c5c authored by Leigh Stoller's avatar Leigh Stoller

Add SetForeignAdmin() method.

parent 6a5af6d2
<?php
#
# Copyright (c) 2006-2015 University of Utah and the Flux Group.
# Copyright (c) 2006-2016 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -1129,6 +1129,17 @@ class User
$this->user["stud"] = $onoff;
return 0;
}
function SetForeignAdmin($onoff) {
$idx = $this->uid_idx();
$onoff = ($onoff ? 1 : 0);
DBQueryFatal("update users set ".
" foreign_admin='$onoff' ".
"where uid_idx='$idx'");
$this->user["foreign_admin"] = $onoff;
return 0;
}
function SetAdminFlag($onoff) {
$idx = $this->uid_idx();
......
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