News:

Wondering if this will always be free?  See why free is better.

Main Menu

Bulk add users?)

Started by BrianTH, May 08, 2014, 05:16:09 AM

Previous topic - Next topic

BrianTH

I will need to add several hundred users to a forum hosted on my site (so I have access to databases and root files) - how do I do this?

I assume that there is an sqldatabase that I can edit?

Or is there a simpler way?

Thanks for any help


margarett

Hi and welcome to SMF ;)

Where do does users come from? Another database, a text file, ...?

You can't just add them to the database directly, it would be necessary to create a custom script that reads your users list and correctly add those to SMF.

I'm moving this to Coding.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

BrianTH

The emails would come as csv from mail chimp

I don't know how do the scripting - how would I start?

I assume that I'm not the first with this need.

margarett

You are, at least that I remember :P

It's not really something easy to create as a standard, because the source of the members table would always be variable... You will have a csv from mail chimp, any other user would have something totally different (or with a different layout)...

Can you give us a piece of your file? Like, the headers and 2 or 3 rows of data? Please mask sensitive information ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

BrianTH

I don't have the file yet - just getting ready for when the discussion board is ready for the wider audience.  It's basically for a volunteer run business support group so we need things to be simple

margarett

Well, but we really need to analyze the file content if we will try to produce something...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

it gets a little complicated, because, for one, dealing with passwords is not easy.

For another, you need to populate more in th user table than just username and email address (which is all the real/useful information that MailChimp gives you, since we don't care about address, etc)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Dragooon

Does MailChimp give raw passwords?

margarett

I'd shoot them if they did :P because that would mean they keep them...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

You'd almost have to give them a password and email it to them in the process - which is also not secure unless you can force the user to reset it on login (which SMF does not provide)

margarett

I have been doing that in the converters I worked on. I generate a random password and hash, so the user has to reset it before login :)
And this http://custom.simplemachines.org/mods/index.php?mod=3351
might do the rest :)

edit: sorry...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

that mod was removed from public view
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

BrianTH

the emails will be in standard format e.g.

[email protected]
[email protected]
[email protected]

These invitations will be sent out with the password changeme


Arantor

And of course that also trusts that your users won't try to hijack any other accounts...

Angelina Belle

A random password could be chosen for each new account.
Whether they did or not, they would still receive email from their "new mailing list"

Some customized code based mostly on existing register-by-admin and/or "send me an i forgot my password" could be used.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

margarett

Quote from: Arantor on May 08, 2014, 05:41:49 PM
And of course that also trusts that your users won't try to hijack any other accounts...
Yup, I would still prefer to force them to reset password...

By the way... I imagine email and password (if any) will provided. Anything else? We, in SMF, require a username... Will we have one?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Technically you don't *need* a password, you could use the email address too, but that has its *own* problems to contend with, namely that exposing an email address as a displayed username would be problematic.

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Well, sort of.

You can have the email address as a username, if you like. You can even log in with your email address under all normal circumstances.

It's only actually a problem if the display name is the email address. Any other circumstance is technically fine, even if there are minor caveats under the hood (non-email usernames are subject to login hashing, email addresses are not)

Angelina Belle

Such a mod would require a CSV.
The CSV would have 2 columns
email   username

It would be up to the user to supply the CSV.
With a mailchimp CSV in hand, and a spreadsheet program, the admin could create a new spreadsheet -> a new CSV of required format.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Advertisement: