A simple plugin for admins to create user accounts by uploading a csv file including users' information.
The first line in the csv file must define what fields the rest of the file includes. The only required fields are username, name and email. If password is not included in the file, a random password will be generated. The fields can be in any order you want. Account details can be sent to users by email, if you wish.
All other fields will be added as metadata. This makes it possible to define, for instance, location or interests in the file if needed. If yout field delimiter is something else than a comma you can have a comma separated list of tags as a value.
The plugin supports both UTF8 and ISO-8859-1 encoded files and a few different delimiters like ',' and ';', for instance.
An example of a valid and simple csv file:
username; name; email; interests
naakka; Jaakko Naakka; jaakko.naakka@gmail.com; Elgg, php, jQuery
The package includes Finnish and English translations.
Changes from version 0.1
View Jaakko Naakka's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Thank you for this!
This is a POWERFUL contribution... Done without asking for penny too! Thanks for sharing your work...
Your are amazing. Remember that!
Ok, so I got the file to work, but now when I preview the user accounts then click submit, all I get is a blank white screen. It doesn't create them or anything, just a blank screen. Anyone else have this problem?? I have over 1400 members, so I've broken it up into 4 separate files so as to not overwhelm my server.
Never mind, I apparently still had too many to a file.
Liz, I'm glad you got it working. For some reason the process of creating user accounts is quite heavy for the database, but it also depends on the amount of other information you have in the file. We are not using this plugin extensively yet but I if we run into similar problems I'll try to boost up the performance in possible future releases.
This would be really be a very useful plugin.
I could upload a csv file. It got properly picked up and showed me the user lists.
But when I clicked "Create User Accounts", it displayed
The php log file shows the following:
Undefined property: stdClass::$language in E:\...\elgg1.5\engine\lib\languages.php on line 87
Any clue on this ?
Naba
Hi Jaakko
I had problems with uploading a csv, I kept getting errors, but I fixed them :-)
So for anyone else getting a CSV error try this:
1. Download notepad++
2. Open your file and make sure the field names are all in lower case
3. Press Format - Convert to UTF 8 without BOM
4. Then ensure the file is in UNIX format by: Format -> Convert to Unix format
5. Save the file and upload and that should do it.
This works for me, might not for others, good luck x-D
Hey Jaakko,
Version 2.0 no longer allows me to create accounts with the email address as a username. Was this intentional? is this new to elgg v1.6?
Thanks,
Kirby
Hi Kirby,
I've just been off my computer for a month and I didn't even know about versin 1.6 until now :) I'll be back to work pretty soon and I'll look into this later on. If I remember correctly there are no changes regarding the username format between versions 0.1 and 0.2, so I guess this is something new in Elgg 1.6. But I'm not sure until I can try the new version myself.
I'm almost looking forward to getting back to work ;)
is possible to import and set a default language? i did try to add the field language and in the rows put en or es (for spanish) and didn't work
@melvyn I think this should be possible but I've never tried it myself. That's something that would be useful for our Finnish users as well so I think I will try this later on.
There's also a small bug in sending emails and I'll try to fix this soon.
ohh thanks, if you can tell me how is the process for import a default language can be nice, well i saw when you select No send emails, always send a email to all the users uploaded
Wow, I was thinking of such plug-in. Thank you very much!!!
Hi folks, and Jaakko, many thanks for a truly useful plugin. This is going to save lots of work for many administrators!
My question is how might a person import an original "date joined" and update the Elgg field with the real date rather than having it default to the date the script was run?
And for that matter, are there any other "system" fields that may benefit from having the original values captured?
- Tom
Does this plugin work with 1.6.1?
Can I make so users that get registered also are put in to/joined to groups?
@Jaakko, I second this:
...Have you tested your plugin on 1.7 alpha? Is it going to be ready for 1.7? It is a critical plugin, for many of us. Thanks!
please help
how to create a CSV file
or put a demo here.
i tried with ms-excel, ms-word, notepad...
i am unable to make a proper file
as the system places an error, "wrong csv file"
Hi saifee,
I think your problem has something to do with the line endings. I know I should fix the plugin but at the moment I'm busy with other projects and this is not a priority. Using notepad should work just fine, check out the example in the release notes in the start of this page.
@Jaakko Naakka
great plugin! I have replace some of the default profile fields, do you know how I can add that info to the cvs file and be completed in the user profile?
thanks!
@vidou,
just add the name of the profile field as column title and the values will be saved as metadata by that name. That should work :)
I'm having problems. ERROR: CVS File in wrong format
I've tried some of the suggestion requested, but none is working. Is there a limit to amount of users to upload on .cvs?
@klhall2000, There is no user limit nor a limit to the size of the file. Adding a lot of users takes some time and the script might stop running at some point depending on the server settings. This plugin could use some updating and performance boosting...
It still seems that your file is in wrong format, or more specifically the line endings are in wrong format. Try using Notepad or something similar to check the file.
Hi Jaakko.
Thanks for your plugin, this is very useful !
But I notice a problem when I connect users I upload via your plugin : These are able to connect, but when i want to disconnect, I'm redirected on the dashboard of the user, without being disconnected. After that, I tried to create users with the admin panel, and I've got the same problem. But, when I restore the db into an ancient version, when upload user wasn't enabled, I can create users and when I connect them, I'm able to disconnect them.
Do you have an idea where the problem come from ?
Benoit
I forgot to mention that I use the 1.6.1 version of ELGG