4 * Copyright 2009, Roland Mas
6 * This file is part of FusionForge.
8 * FusionForge is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; either version 2 of the License,
11 * or (at your option) any later version.
13 * FusionForge is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with FusionForge; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 require (dirname (__FILE__).'/../www/env.inc.php');
25 require_once $gfwww.'include/pre.php';
31 * login:email:fname:lname:password
32 * password is cleartext
33 * login might be optional if sys_require_unique_email is true
36 $f = fopen ('users.txt', 'r') ;
38 $l = trim (fgets ($f, 1024)) ;
39 if ($l == "") { continue ; } ;
40 $array = explode (':', $l, 5) ;
45 $password = $array[4] ;
49 $r = $u->create ($login, $fname, $lname, $password, $password, $email,
50 1, 0, 1, 'UTC', '', '', 1,
51 'shell', '', '', '', '', '', 'US', false);
54 print "Error: ". $u->getErrorMessage () . "\n" ;
63 // If everything went well so far, we can commit
68 // c-file-style: "bsd"