Not Solved import users in db
#1
Not Solved
Hello
I have a text file lixe

user
[email protected]
password

user1
password1
[email protected]

user2
password2
[email protected]

...

How can import this members list in mybb db?

Thanks
Reply
#2
Not Solved
This needs some more steps to achieve.

First you need to convert this user stanza to an appropriate SQL syntax:
INSERT INTO mybb_users (username, email) VALUES ('user', 'password');
INSERT INTO mybb_users (username, email) VALUES ('user1', 'password1');
INSERT INTO mybb_users (username, email) VALUES ('user2', 'password2');

Then the passwords needs to be converted/hashed/salted.
What is the current password look like, plaintext or md5 hashed? Both can be used to convert to fit MyBB.
You need to grab the piece of MyBB PHP source code to convert the passwords and create a salt.

Third you need to fill up all necessary and missing values in table mybb_users, e.g.
postnum=0
threadnum=0
regdate=<timestamp>
lastactive=<timestamp>
lastvisit=<timestamp>
and more...
Best practise, set up a default user configuration in ACP and then create a new user as reference/template for all new users to insert. Export this user row and replace username, email with contents of your list.

Without knowledge in file manipulation, SQL and PHP this will be a tricky action.

[ExiTuS]
New Forum / MyBB 1.8.26 + innovative full-responsive Theme
Live-Escape-Game-Forum
Reply
#3
Not Solved
I would highly suggest writing a PHP script to use the user datahandler to insert users as this will make sure they're valid, rather than trying to insert them with SQL queries.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)