Basic scripted user manipulation [message #33820] |
Fri, 22 September 2006 17:27 |
pssc
Messages: 6 Registered: September 2006
Karma: 0
|
Junior Member |
|
|
Script allows you to manipulate form logins allowing you to create,delete,ban,unban,rename,modify,display users.
lives in the scripts directory
eg.
./users.php create pssc "Phillip Camp" pssc(at)noware(dot)com 'zxy123:'
./users.php ban pssc
./users.php rename pssc pcamp
Small patch for rename to work in forum_data dir:-
--- src/users_reg.inc.t.orig 2006-09-20 23:35:16.000000000 +0100
+++ src/users_reg.inc.t 2006-09-20 23:37:15.000000000 +0100
@@ -178,6 +178,7 @@
$this->html_fields();
q("UPDATE {SQL_TABLE_PREFIX}users SET ".$passwd."
+ login="._esc($this->login).",
name="._esc($this->name).",
alias="._esc($this->alias).",
email="._esc($this->email).",
-
Attachment: user.php
(Size: 4.89KB, Downloaded 1461 times)
|
|
|
Re: Basic scripted user manipulation [message #34956 is a reply to message #33820] |
Mon, 27 November 2006 13:45 |
appscontent
Messages: 33 Registered: November 2006
Karma: 0
|
Member |
|
|
I have been able to create a single user by running the users.php script detailed earlier in this thread. It works like a charm and greatly assists those of use who are not PHP coders and don't know how to call the functions in fudapi.inc.php.
I have saved an Excel file of my users in CSV format. It is my understanding that I could use PHP's fgetcsv() function to fetch users one at a time and for each user perform the create user. In other words, I don't want to add users one by one as follows:
./users.php create pssc "Phillip Camp" pssc(at)noware(dot)com 'zxy123:'
I would like to read a file and create the users until I hit the end of the file.
Could someone assist me in adding this logic into users.php (see original script attachment)? I have about 2000 users I want to add as users in the next day or so.
|
|
|
|