CSV User Upload v1.8

  • I think there is an error in your processFile method in UploadUsers.php. When iterating through rows you are not processing the last row. Your code:

     

    /// Go through the user rows
    for ($i = 1; $i < count($rows) - 1; $i++) {
    $rows[$i] = trim($rows[$i]);
    if (empty($rows[$i])) {
    continue;
    }

    You have already processed the first row (the headers row) so you should not be subtracting 1 from the row count. Instead the code should read:

    /// Go through the user rows
    for ($i = 1; $i < count($rows) ; $i++) {
    $rows[$i] = trim($rows[$i]);
    if (empty($rows[$i])) {
    continue;
    }

    I think the same error exists in you other plugin "upload_groups".

     

  • Thanks for the pointer, Brian. The original class hasn't been modified, I've assumed it was fully functional. I will double check this, as I haven't noticed any missing rows on my test imports.

  • Would it be possible to upload multiple custom fields with this? ie. (Username, password, email, phone number, address)

    And if at all possible is it possible to mass upload user's avatars aswell?

  • Yes, all custom fields will be interpreted as metadat and saved on a user entity. For avatars, you would need to write an additional handler to grab the file from a url and save it using elgg's filehandler

  • @Brian, the issue was confirmed and fixed.

    @Ben, I've added a plugin hook to allow specific headers to be handled in a special way, so you can add a trigger and process user avatars with your custom method

  • Hey i'm sorry but I have no idea what you mean? is there another plugin that you've made that does this? is there a modification to the exisiting plugin? Sorry i'm not to experienced with all this but i'm coping so far.

  • Hi, just reporting some bugs..

    1) If the password is equal to the username in a CSV file, and less than 6 characters; it throws in empty lines when click "upload" (empty lines equal to the number of lines in the CVS file). The message "password needs more than 6 characters" never appears.

    2) If the number of lines exceeds 250, it cannot upload all users and reports "form missing token and ts". But very possible it is because of my server limitations..

    /TheMuller

  • Could you please report the issues to: https://github.com/arckinteractive/upload_users

    On item 2, you are most likely running out of server memory. Check your logs.

    One of the later commits should allow you to specify offsets for iterated uploads of large datasets.

Arck Interactive

You imagine. We create. We develop custom social networks, content management systems and other rich internet applications. We help entrepreneurs and creative agencies breathe life into their visions. Let's start a conversation!

Stats

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

Other Projects

View Arck Interactive's plugins