Commit abe1386e authored by Leigh Stoller's avatar Leigh Stoller

Change mkacct usage to tbacct. Also, instead of always issuing a

tbacct add followed by a setgroups, issue a tbacct for new users, and
a setgroups for existing users. Cuts down on mail traffic.
parent 510921fb
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......
......@@ -470,9 +470,19 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
TBERROR("Invalid $user status $curstatus in approveuser.php3",
1);
}
$query_result =
DBQueryFatal("UPDATE users set status='$newstatus' ".
"WHERE uid='$user'");
DBQueryFatal("UPDATE users set status='$newstatus' ".
"WHERE uid='$user'");
#
# Create user account on control node.
#
SUEXEC($uid, $TBADMINGROUP, "webtbacct add $user", 1);
}
else {
#
# Only need to add new membership.
#
SUEXEC($uid, $TBADMINGROUP, "websetgroups $user", 1);
}
TBMAIL("$user_name '$user' <$user_email>",
......@@ -492,12 +502,6 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
echo "<p>
User $user was <b>granted</b> membership in $project/$group
with $newtrust permissions.\n";
#
# Create user account on control node.
#
MKACCT($uid, "webmkacct $user");
SUEXEC($uid, $TBADMINGROUP, "websetgroups $user", 0);
continue;
}
......
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