happynuclear
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Add Multiple Users for WordPress] Change Default For Display NameHi Ademos,
Again, sorry for the delayed response.
You’re absolutely right, the First Name / Last Name should be the default display. I am adding this function to the next release, with a setting to choose a default variable for this field.
Thanks for the suggestion!
Forum: Plugins
In reply to: [Plugin: Add Multiple Users for WordPress] custom metadata suggestionHi Robert,
I know this is a bit late and you’ve probably moved on from it at this point.
However I wanted to let you know (and other readers) that I will be attempting to improve the CSV method to include custom meta data (and standard fields) into the new release.
Cheers.
Hi Basemaly,
Sorry for the delayed response to your question.
I am working additional fields into the plugin now. You may not have any use for it any more, but its part of the plan for the 1.3 version.
I didn’t think of adding the registration date, but I will attempt to get this in there.
Cheers
Hi Frede,
Thanks for the kind comments. I’ve kind of been neglecting this plugin for a while as I’ve been in and out of hospital and working hard to pay the bills.
I am working to include this and many other features into the 1.3 release. I’ve had certain difficulties in allowing custom roles as it seems the various plugins out there handle custom roles differently (even though the core concept is the same) and it is a bit confusing for a mid-level developer like me.
Rest assured it is coming!
Hi RFouts,
Unfortunately with how WordPress treats usernames there isn’t the facility built in to change the username once its set – you can do it if you directly modify the database and change the user’s name, but its not advisable if you’re not comfortable with doing that, and it doesn’t really let the user pick there own name, which is what you want.
The only real way for a user to pick their own username is if they register themselves, which isn’t the scope of the plugin at this time I’m afraid.
There is, however, the facility for users to change their nickname, and then set that nickname as their ‘display name’ which should hide the username from being seen by others on the site. You would simply have to advise users you add to do this if they wish to hide their username from others. You could probably add this advice into the email it sends to newly registered users.
Hope that helps!
Ok another test time, if you’re willing!
In the Skip Form function I have replaced the wp_create_user and update_user_meta functions with the insert_user function and a couple of direct additions to user meta data for multisite.
I am hoping this will create less load on the function – it worked for me adding 10,000 users, but then, the last one did as well and did not work for you.
The real issue with going a step further than this is that I don’t want to bypass WordPress functions like ‘insert_user’ and go straight to database inserting just with sql. I want WordPress to handle it, however, if it has to be done, it has to be done!
If you’d like to test it out, visit this page:
http://www.happynuclear.com/sandbox/amu/add-multiple-users-for-wordpress.php
And below the Download link is a link to the beta test version. Just grab this file, replace multiadd.php in the plugin folder with this new version and give it a shot!
Hi Bamajr,
Sorry for the delay in response – problem with being Australian is I’m asleep while the rest of the world is working!
So sorry it hasn’t worked – I didn’t encounter any such error when I tested up to 10,000 – and yes your system should definitely be able to handle it, so I guess my php adding process is probably way too bloated to be feasible at such high volumes. The 500 error is really bad – dammit.
I’m gonna spend a little time doing some rewrites and hopefully nail down the problem. It’ll probably take a little time but I’ll get it there.
Thank you very much for taking the time to test it out thoroughly, its a great help in getting it working properly, and yes if you’re interested in testing the next update before it gets released I’d definitely take you up on that!
You’re welcome, I hope it works out! Not much of a bulk function if it doesn’t work in bulk!
Thanks for the php info too, that definitely will come in handy.
Make sure you do the set_time_limit thing before you try adding heaps of users – when I added 10,000 it took a while to power through it!
Ok, version 1.2.2 should be up in a sec. Please give that a try and let me know how it works for you!
Cheers.
Alright, I cracked it. Yay.
Am doing some further testing and code clean up then will update to 1.2.2 version soon.
After you upload your file, after the file contents have been added to the scroll box, there will be another button to skip the form and just straight add the users. This is a similar but different function that bypasses the creating of form lines on the page. As it progresses through each line of the CSV, it will find matching entries with usernames/emails and ignore them, giving a simple error saying that user or email already exists, and move on to the next line.
Because it takes a while (I just added 10000 users to my blog!) it does require this line:
set_time_limit(0);added to the wp-config.php file above the ‘that’s it, happy blogging’ line – this is to stop WordPress from cancelling the function loop after its default 30 secs. It did take a good five mins of the browser ‘thinking’ before the adding of 10,000 was complete, but it worked nonetheless.
After testing quite a bit it appears each loop to add a user is just doing way too much, so I’m gonna just rewrite the whole CSV thing for the next version, with the eliminate duplicate lines function built in and an option to skip the verification screen for larger files. I think that’s going to be the only way to make it work with such high volumes of users.
Hi Bamajr,
Sorry for the slow response – it seems the forum ate my last post…
I have been testing it out and my server, with a php memory limit of 64M (with script limit of 32M) seems to be able to do up to 550 registrations at once without running into the issues you list above. If I attempt to do anything over that I get the same thing as you – it says it has processed but nothing actually happens.
I think without really being able to jack up the memory limit on the server its going to make it very difficult to do 10,000 at a time. I’ve requested an increase to test it out and make sure its the memory limit breaking it, but am yet to hear back from the host.
There is another alternative, if you’re running php 5.3 – a ‘garbage collection’ command can be invoked to clear out the memory. My server is running 5.2 so I can’t test it out, but if you are running 5.3 I could create a modified version of the plugin and send it to you to test out.
Sorry its being such a pain to use – honestly I didn’t expect anyone to want to add so many accounts to a WP site at once, but obviously I underestimated that and do apologise. Hopefully we can find a solution.
Hi again,
This is actually something I tried to implement originally, and the initial function became so complex that I abandoned it with the intention to go back and add it to the next release.
You can actually submit the form of users with duplicate entries in it. As each user is registered one-by-one from the top, any duplicates further down the list with the same username or email address will generate an error and not try to add it – the error shouldn’t stop the form from continuing through to the end.
Of course, this does mean your Added Users feedback will have a bunch of error notices saying the email address or username is taken, but it may be an option in the meantime until I can build in the option to automatically eliminate duplicate entries.
Let me know if that works or if you have any additional ideas – I do love ideas and feedback, so thanks again!
Hi Bamajr,
Thanks for the question – will be responding to your other post in a moment.
I was just playing with the adding of an email address in the username field and it seems to accept email addresses as usernames both in the manual input and CSV section.
Is the issue that you have the CSV data and want to use the same column of info, the email address, as both the username and the email and the Custom Column Order function does not have the facility for that? Or is it actually throwing you an error when you try to put email addresses in the username field?
Cheers, look forward to your response!
Hi Scott,
Thanks for the suggestion – I’ve just sent you an email about it =)
If you (or other users) have any further ideas on how you’d imagine the function working effectively in Multisite please do let me know and I will work it into a future update.
Cheers,
Matt