]> andersk Git - sql-web.git/blobdiff - batch/signup.php
signup: now takes signups by argument
[sql-web.git] / batch / signup.php
index ecb2ab92f2d1d3feab410012190745c70039dd26..1bb7cd86e851ba9f416f094ac97ae5fd6e7491b8 100755 (executable)
@@ -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);
 
This page took 0.028227 seconds and 4 git commands to generate.