4 * Copyright 2009, Roland Mas
6 * This file is part of FusionForge. FusionForge is free software;
7 * you can redistribute it and/or modify it under the terms of the
8 * GNU General Public License as published by the Free Software
9 * Foundation; either version 2 of the Licence, or (at your option)
12 * FusionForge is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 require (dirname (__FILE__).'/../common/include/env.inc.php');
23 require_once $gfcommon.'include/pre.php';
29 * login:email:fname:lname:password
30 * password is cleartext
31 * login might be optional if sys_require_unique_email is true
34 $f = fopen ('users.txt', 'r') ;
36 $l = trim (fgets ($f, 1024)) ;
37 if ($l == "") { continue ; } ;
38 $array = explode (':', $l, 5) ;
43 $password = $array[4] ;
47 $r = $u->create ($login, $fname, $lname, $password, $password, $email,
48 1, 0, 1, 'UTC', '', '', 1,
49 'shell', '', '', '', '', '', 'US', false);
52 print "Error: ". $u->getErrorMessage () . "\n" ;
61 // If everything went well so far, we can commit
66 // c-file-style: "bsd"