MyBB Community Forums

Full Version: Insert 200 new users to database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am making a customised forum for a friend who is getting married. She wants to use the mybb forum set up for managing RSVPs, present lists, locations of hotels etc yadda yadda.

Using XThreads and page manager I have the site looking pretty neat and functioning well, (thanks Yumi and querschlaeger) but I don't really want to sit there putting all the users in by hand.

My friend has a list in excel format with guests and so on. I would like to know if it is possible to insert the information below via a MYSQL insert:

Username:
Password:
Login name:
1 additional Custom profile group (fid4)
Usergroup.


(I am using Yumi's display name plugin - that is why I have username AND login name)
The invitations will be sent by snail mail with the login name and password printed, so I do need the generated passwords to be as in the list which I upload, rather than randomly generated.

The board will be invite only (that is, its not possible to register, and the users will be generated by me in advance).

I don't want to use the invitation plugin as the guests permissions and the activities they are invited to are split by usergroup. If I use the invite plugin then the users would have to be manually assigned to a correct usergroup immediately on registration, and thats not really feasible.

Can anyone give me some advice on how to upload this data?
Hi Shukaku, I think you may not have read my post.

That link is to create random users, it only makes 100 and its NOT recommended for use on a production forum (which is my biggest concern)

I read all SEVEN pages of that thread to confirm that.

Thanks.....
better request for a plugin that has input fields and it gets inserted to the database whenever you hit submit or enter after entering the details as it runs the sql queries to insert those fields.

may be an "import contacts" feature must be included in the plugin for easy use.
God, I'm really not reading anything at all today Toungue
Just ignore my post Toungue
NP Shukaku (waits for Mr SQL aka Matt to see post :p)

@The Godfather - why would I request a plugin? I was thinking of once I knew the format I could concatenate values round the excel cells and then export to csv and import to db....if that is feasible
^^^ yep. you can do that but which is nothing but a list of sql queries to insert into the database, and it can also be turned into a plugin so that you can use it later from acp rather than manually editing fields and running them in phpmyadmin.
Godfather - you want a plugin. You make it. I want a one off query. If worst comes to worst me and 3 buddies will type in 50 users each by hand.
No offense. Its just a suggestion. If i need it, i will post a new thread or make it myself.
So, wait for the correct response.
The sql for inserting a user is this:

INSERT INTO mybb_users (uid, username, loginname, password, salt) VALUES (1, user1, login1, passwordhash, '');

You'll have to work out the password hash first using md5(md5($salt).md5(pass))

To do this seamlessly, you can write a small script to take in the csv file and generate the hashes and insert them in to the database. Shouldn't be hard to do.

If you can PM me a few lines of the csv file I can see if I can write up something for you Wink

Pages: 1 2