Skip to:
Content
Pages
Categories
Search
Top
Bottom

Import existing user

Viewing 10 replies - 1 through 10 (of 10 total)
  • I think we need a generic importer script that people can modify and use to import users from a csv file or a mysql table. At a bare minimum we need to have username, full name, email etc fields in the data to be imported.

    The script needed should perform all steps performed by BP to create a user, feeds etc.

    The code should all be there, it is probably a question of cut/paste.

    Can someone point me to the files and I can create this.

    If thi sis possible, I will import a bunch of community sites I have on various CMS’ to BP.

    BP is the best of all of them – awesome work.

    I tried this script http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/all-comments/ and it works great, but only creates WP users – I would like to know how to mod this easily to create BP users also. I just need pointers and I will get to work.

    Thanks

    Hi :)

    So, there is no option to use BP out of the box if wpmu has already users? I am just wondering :)

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Trying to use Manoj Kumar’s Buddypress Users Import plugin. I get this error:

    Fatal error: Maximum execution time of 30 seconds exceeded in /serverpath/wp-includes/class-phpass.php on line 60

    I don’t recognize anything in that line:

    function get_random_bytes($count)
    {
    $output = '';
    if (($fh = @fopen('/dev/urandom', 'rb'))) {
    $output = fread($fh, $count);
    fclose($fh);
    }

    Can I just temporarily delete it? Would that solve the problem? Other solutions?

    I’m trying to import 600+ members, so I’m not surprised it times out.

    EDIT: 490 members were actually imported quite nicely! :-)

    EDIT2: Not as nicely as I first thought… Username and full name didn’t make it over, only email addresses. Should I have added labels to the top line?

    EDIT3: There is no fast way to delete 490 users…?

    EDIT4: Does this plugin also update firstname + username in wp_usermeta. If not, I have to add it.

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Fatal error: Maximum execution time of 30 seconds exceeded in /serverpath/wp-includes/class-phpass.php on line 60

    This error has nothing to do with Manoj’s plugin, BuddyPress, of WPMU code. It is a standard server error that occurs when any PHP script exceeds a preset execution time limit. The default is usually set to 30 seconds.

    If you have access to changing your php.ini file, then make the alterations there. If not, then you can make them in your .htaccess file (php_value max_execution_time 200).

    I realize that you are working through WPMU and BP, learning as you go. That is great! But, a little googling can answer a lot of issues you will come across while learning the ins and outs of PHP programming, database management, server operation and optimization, etc.

    http://lmgtfy.com/?q=Maximum+execution+time

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Jeff Sayre, I already google a lot of things. I don’t think it’s off-topic to point out that this essential Buddypress plugin – that should be a built-in BP feature… – runs into this time-out when you use it with over 490 users.

    All my issues may be very boring, annoying and off-topic to you, but I’m just a regular web developer (html, css, a bit of js and php) running into lots of basic issues that aren’t solved. I had no intention learning PHP, but Buddypress has lots of loose ends.

    I hope by posting here the programmers at Automattic become aware of issues and that other developers on this forum can benefit from solutions I or others come up with.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    I’ve noticed the imported users have also been added to the mailing list via my bp-custom.php function.

    So the plugin actually “runs” the regular registration processes, including wpmu_activate_user? Whatever member registration custom code or plugin you have inbetween, this plugin takes it into account?

    That is pretty cool. :-)

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    @Peterverkooijen

    I have no problem with you posting in the BP forums. If I did, I would say so and/or ignore your posts. In fact, I often answer your questions or at least point you in the proper direction. I did the former above.

    I also appreciate the fact that you are diligently working on learning PHP and the inner workings of WPMU and BP. It is a long road to slog.

    In suggesting that a Google search would have answered your question–and more than likely much more quickly than waiting for someone to respond on this forum–I was simply making a point that since all of us moderators volunteer our time, and a lot of it at that, it helps everyone if a member first searches out a particular issue. That means if it is specific to BP, they search the BP forums first, and then Google second. If it is more of a general programming issue (or as you say above, a “basic issue”), then they search Google first then the WPMU or BP forums second. If they find nothing, then posting is recommended.

    I assume that you do use Google. We all do. But, I was trying to give you a friendly reminder by first answering your question, second suggesting that issues outside of the scope of WPMU or BP can often be quickly answered via Googling, and third provide a link to the answer in such a way that reinforces that point to anyone who reads this thread.

    I can’t tell you how many times a day I answer a question on these forums whose answer could have been found by searching the forums or google. I don’t mind helping out, but my time is limited and it gets old.

    Just to be clear to everyone, none of the moderators on these forums are employees of Automattic. We do not get paid for the copious amounts of time we volunteer.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    I really do appreciate all your hard work, Jeff Sayre!

    I don’t only post to beg for solutions. A lot of my posts are reminders for myself what I’m doing, what I have already tried and what issues I still need to solve.

    I imagine other regular web developers using Buddypress will run into many of the same issues I run into. Hopefully my threads and posts will be useful resources to them.

    The solution to this users import time-out issue is now available within the Buddypress forum. One more thing you hopefully don’t have to answer again in the future.

    My experience even put an approximate number on it. I think on the second attempt I’ll just split my list in half, import them as two batches of 300.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Apparently Manoj Kumar’s very essential users import plugin does not work with the latest version:

    The Big K at 19:19 on 9 August 2009

    Hi Manoj,

    The plugin is not compatible with WPMU 2.8.3 & Buddypress 1.0.3. Could you please fix it.

    This is also the version of the plugin I’ve tried – I gave the wrong link earlier.

    In my installation the plugin worked for the essentials – username, email address – but nothing was added to meta in wp_signup and the xprofile fields.

    Next I’ll try it in a fresh install of Buddypress 1.0 RC… :-(

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.