Upload Users v0.2

Release Notes

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

  • Better error control
  • Preview of uploaded users before actually creating the accounts
  • Possibility to have a list of tags as a value
  • I'm sorry, 

    My problem came with another plugin, remote login. 

    Benoit

  • @Jaakko  Does this work with Plugin Manager ?  Do we only need to put the corresponding "fieldname" into the csv in order to import the field ? 

  • @elHayze, I'm not familiar with Plugin Manager, but you can use any fieldname and that value will be saved as metadata on the user entity. That should work if Plugin Manager saves the data as metadata.

  • Thanks Jaakko. Does it work smoothly with 1.7.1 ?

    Havent had time to try on 1.7.1.

  • @elHayze, I don't know, I haven't had time to try it with 1.7 (nor 1.6) either. But I'm thinking about upgrading it sometime in the summer, but I can't promise anything.

  • Great plugin! used combined with our "bulk_image_upload" plugin to preload 23000+ users with their moodle profile picture files into a new elgg university site.

    Nice work!

  • Pablo, that sounds like a great plugin as well! I also come from Moodle background and, as you probably noticed, this is very similar to upload users in Moodle.

  • Really cool plugin, but it seems to have a problem with the "default profile widgets" plugin.

    I have a predefined set of widgets, but when I upload users, they get duplicated widgets...

    Do you think I can handle this by tweaking the plugin or is it based on core elgg admin "create user" feature ?

  • Great tool.  works a treat on 1.7.1.  and imports to custom fields as well.  Emails get treated as spam/junk by outlook though.

  • Hello I'm new to elgg. I had a Ning network with about 4,000 members. I just uploaded the csv file. But nothing happend. Please please tell me how to import the users from a csv file. I'm using the latest version of Elgg.

    Please tell me how to import?

    Which software used to import ?

    If you have any example data please share it with me.

     

    Many thanks in advance...........

  • I am in the same position as anz. I am very new to Elgg.

    I have uploaded the plugin and it shows in my administration tools after being enabled. I am sure it will work but I have two basic questions.

    Where does the csv file have to be loaded to and does it need to have a special name?

  • I am moving from boonex to ELGG, I am trying to figure out how and where to install this. I know this is a newbie mistake, but I could use the help regardless if anyone can give me a hint I would be super enthused.

  • @JDH, You need to download this module >extract it>put inside the mod directory > enable it>and then import users from CSV

  • Ok, Got that far. Now, can anyone tell me how to export a mysql user database so that I can reimport it to ELGG?

  • I see that Elgg does not allow hyphenated usernames. Anybody know if there is a way to change this? Because of this I'm afraid several of my users will not be able to use an account through LDAP but I will have to create one manually for them.

  • @Erik - You will probably have better luck asking this question in one of the group forums instead of a plugin comment.

  • I am using elgg 1.7.4 and it works fine uploading and creating members. I tested is with the option "Send email to new users" set to No, but, it did send the email. Does anyone have a fix for this?

    Thanks Steve 

  • Email or not Email is controlled by upload_form.php

     

    --------------------------------------------------

    /// Display send emails pull down

    $options = array('1' => elgg_echo('upload_users:yes'), '0' => elgg_echo('upload_users:no'));

    echo '<h4>' . elgg_echo('upload_users:send_email') . '</h4>';

    echo elgg_view('input/pulldown', array('options_values' => $options, 'internalname' => 'email'));

    echo '<br />';

     

     

     

    this is passed to class.UploadUsers.php

    -----------------------------------------------

    /**

    * Set wether to send user accounts on email or not

    * @param $email boolean

    */

    function setEmail($email){

    $this->email = $email;

    }

    //and here --------------------------------------

     

    /// Send an email to the user if this was needed 

    if($this->email){

    $subject = sprintf(elgg_echo('upload_users:email:subject'), $CONFIG->sitename);

    $message = sprintf(elgg_echo('upload_users:email:message'), $user['name'], $CONFIG->sitename, $user['username'], $user['password'], $CONFIG->wwwroot);

    notify_user($guid, 1, $subject, $message);

    }

    -----------------------------------------------------

    It looks to me like if($this->email) is not complete and should be if($this->email =='1')

    but that does not work either, any thoughts of what I am overlooking?

    Steve

  • commenting out this in class.UploadUsers.php, stopped the notification

    //if($this->email){

    //$subject = sprintf(elgg_echo('upload_users:email:subject'), $CONFIG->sitename);

    //$message = sprintf(elgg_echo('upload_users:email:message'), $user['name'], $CONFIG->sitename, //$user['username'], $user['password'], $CONFIG->wwwroot);

    //notify_user($guid, 1, $subject, $message);

    //} 

  • My question is who is the actual owner of the accounts created with this plugin?

    I've had a real big issues after creating accounts with this plugin, if any user changes their emails addresses or try to change their passwords they get locked out of their accounts and even the site admin cant reset their passwords so the accounts are lost. I've even tried updating user passwords through mysql database useing this post by dhrupDeScop to no avail. Accounts seem to be lost forever! :-(

  • @clu55ter: this plugin was written for Elgg 1.5 and never updated since then. It might have perfectly worked on Elgg 1.5 and maybe still partly works. But without carefully investigating the code to make sure that there are no issues due to using it on Elgg 1.8 alone I would suggest to not use it anymore - and you already found out that there seem to be problems.

    Maybe this alternative plugin http://community.elgg.org/plugins/852868/1.8.2%20RC/csv-user-upload will work better for you.

  • Thanks @iionly the issues that i mentioned above was on my elgg 1.7xx site, people thinking of using this plugin can use this information to decide weather or not this plugin is for them.

Jaakko Naakka

Partner, Head of Development at Intunex Ltd.

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3561
  • Recommendations: 8

Other Projects

View Jaakko Naakka's plugins