X-Git-Url: http://andersk.mit.edu/gitweb/sql-web.git/blobdiff_plain/2d13bff71f8330dcfb2fa37b2b251f5274316a15..690e37fb59e0ed5c5f90365776f61132eeeba5f8:/batch/signup.php diff --git a/batch/signup.php b/batch/signup.php index ecb2ab9..1bb7cd8 100755 --- a/batch/signup.php +++ b/batch/signup.php @@ -6,17 +6,16 @@ require_once('mitsql.lib.php'); require_once('batch.inc.php'); -$callingUnix = posix_getpwuid(posix_getuid()); - -$myUsername = escapeshellcmd($callingUnix['name']); -$hesinfo = explode(':', trim(`hesinfo $myUsername passwd`)); +$myUsername = $argv[1]; +$myUID = $argv[3]; +$hescmd = "hesinfo $myUsername passwd"; +$hesinfo = explode(':', trim(exec($hescmd))); if (count($hesinfo)>=4) { $myName = explode(',', $hesinfo[4]); $myName = array_shift($myName); } else { $myName = $myUsername; } -$myUID = $callingUnix['uid']; $myEmail = $myUsername.'@mit.edu'; $myPassword = substr(uniqid(),0,7);