]> andersk Git - sql-web.git/blobdiff - batch/signup.php
signup exits rather than die'ing
[sql-web.git] / batch / signup.php
index 1bb7cd86e851ba9f416f094ac97ae5fd6e7491b8..edfde59b3757369814f2ca64d2b9fdaa42c9f038 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/php -q
 <?php
 
 require_once(dirname(__FILE__).'/../mitsql.cfg.php');
@@ -17,7 +17,7 @@ if (count($hesinfo)>=4) {
        $myName = $myUsername;
 }
 $myEmail = $myUsername.'@mit.edu';
-$myPassword = substr(uniqid(),0,7);
+$myPassword = substr(md5(uniqid()),0,8);
 
 if ($myUID<1000) exit('bad UID');
 
@@ -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.060716 seconds and 4 git commands to generate.