Question About Adding Users From A Mailing List [message #34829] |
Mon, 20 November 2006 13:58 |
appscontent
Messages: 33 Registered: November 2006
Karma: 0
|
Member |
|
|
I admit this is more a question of how to code in PHP ...
I have an extract file in Excel format that contains the following 4 columns of user data:
1. user_name
2. real_name
3. email_address
4. user_password
I have been playing with some of the code that others have posted in the various forums here and found some code call "user.php". I can run this code from the command line as follows, and it successfully adds a single user for me:
bash-2.05a$ php -q user.php create user_name "real_name" mail_address 'user_password'
Question: How can I run this from the command line to read and loop through my extract file to add all my user?
I know that fudapi.inc.php has a function call "fud_add_user" that I probably should be using, but I am not a PHP coder so I could probably on get as far as below if I had to build from scratch:
<?php
include ("fudapi.inc.php");
$ret = fud_add_user();
?
[Updated on: Mon, 20 November 2006 13:58] Report message to a moderator
|
|
|
|
|
Re: Question About Adding Users From A Mailing List [message #34868 is a reply to message #34866] |
Tue, 21 November 2006 15:12 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
That would not work because you need to insert passwords as md5 hashes and you need to populate few additional fields in the users table beyond the login/name/password/email
FUDforum Core Developer
|
|
|