]> andersk Git - sql-web.git/blobdiff - batch/signup.php
signup: lower minimum UIDs
[sql-web.git] / batch / signup.php
index 78655427cf425f09385e1e5bf3f25a767106b4ef..50041296f75041e1d943c9ff7722046961c5405b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/php -q
 <?php
 
 require_once(dirname(__FILE__).'/../mitsql.cfg.php');
@@ -17,9 +17,9 @@ if (count($hesinfo)>=4) {
        $myName = $myUsername;
 }
 $myEmail = $myUsername.'@mit.edu';
-$myPassword = substr(md5(uniqid(),0,8));
+$myPassword = substr(md5(uniqid()),0,8);
 
-if ($myUID<1000) exit('bad UID');
+if ($myUID<100) exit('bad UID');
 
 $Login = new Login($myUsername);
 if (!$Login->exists() && !empty($myUsername)) {
@@ -29,7 +29,7 @@ if (!$Login->exists() && !empty($myUsername)) {
 if ($Login->canSignup()) {
        $User = new User($Login->getUserId());
        $User->signup($myPassword);
-       die($myPassword);
+       exit($myPassword);
 }
 
 ?>
This page took 0.024015 seconds and 4 git commands to generate.