Programming

Programming questions? Ask a programmer for answers ASAP

Ask a Computer Expert,
Get an Answer ASAP!

I need to import 120,000 users into a Joomla installation which…

Customer Question
I need to import 120,000...
I need to import 120,000 users into a Joomla installation which has 45,000 users already. The import list has passwords in plain text and may have users which already exist in the database which should not be overridden. I have tried using userport but the browser hangs after I load about 16,000 users since it lists all existing users and there appears to be no way to disable this without changing the code. I need a working solution that will successfully do this import from a single CSV file for the 120,000 users.
Submitted: 8 years ago.Category: Programming
Show More
Show Less
Ask Your Own Programming Question
Answered in 5 minutes by:
6/29/2010
Programmer: Arty, Computer Software Engineer replied 8 years ago
Arty
Arty, Computer Software Engineer
Category: Programming
Satisfied Customers: 575
Experience: 15+ years of programming, C, C++, Java, PHP, awk, ruby, shell, ASM, Forth, Raptor, M.A.R.I.E, Excel
Verified

Hi.

 

Can you show 1 line from your .CSV file (with masked password XXXXX)?

 

Regards,

Arty

Ask Your Own Programming Question
Customer reply replied 8 years ago
Hi Arty,

The input file format is configurable - the source is a mysql database table from which I am generating the CSV file(s) to be imported.

Right now I am using the userport tool's specified format. From userport:

The field separator used for both imort and export: ,
The usertype (group) assigned to new users: Author.
The usertype (group) of the existing users can not be changed.
When a user is added, but no password XXXXX found, an error will be given and the user will not be added.
The passwords of the existing users can not be changed.
No email will be sent to the new user when a new user is added.
No email will be sent to the existing user when a password XXXXX XXXXX
Fields must be - in that order - name, login name, email, password.

But I can change the input file if necessary from the mysql table.
Thanks,
Karan
Programmer: Arty, Computer Software Engineer replied 8 years ago

> the source is a mysql database table

 

I will either rewrite userport to meet your requirements or will not use it at all (but will create a script to import users).

But in any case I should know your format. I'm sure it is not MySQL from Joomla DB (because there is no plaintext password XXXXX there).

 

So please provide me sample CSV record (without passwords, emails etc.., just change it to ***)

 

I would like to clarify your reqirements:

> The usertype (group) of the existing users can not be changed

> The passwords of the existing users can not be changed.

 

Do you mean that by any circumstances not to change existing users? Or you should change password XXXXX existing user if it is found in the imported db?

 

Regards,

Arty

 

Ask Your Own Programming Question
Programmer: Arty, Computer Software Engineer replied 8 years ago

One more question - do you have a shell access to that server?

 

Ask Your Own Programming Question
Programmer: Arty, Computer Software Engineer replied 8 years ago

I have no reply from you (what fields do you have in the file to be imported) and I should go away.

 

I'm opting out, I hope other experts can help you as soon as you provide missing info.

 

Regards,

Arty



Edited by Arty on 6/29/2010 at 3:42 PM EST
Ask Your Own Programming Question
Customer reply replied 8 years ago
Hi,

You are right, the source is not mysql from Joomla

Here is a sample record in the following format:

Name, login name, email, password.
James Test,[email protected],[email protected], Ajs10KK21

Yes, existing users should not be overridden. The login name should be unique. The source uses the email as the login name hence why it is repeated in the sample record.

Also, yes I do have ssh access to the destination server.
Programmer: Arty, Computer Software Engineer replied 8 years ago
Hi.

Sorry for delay, I was testing the script. It is ready. You can download it from here.
Here is an instruction how to use it.

1) Unpack convert.php and put it into your Joomla root directory (where configuration.php is located)
2) Backup your Joomla database. Though I have tested the script, everything is possible.
3) Stop user registration temporary. Login as admin from web, Site -> Control Panel -> System -> Allow user registration = no
4) Login to SSH (that's importang) any account (not root) that has write permissions in Joomla web directory
5) Put your CSV file into the same directory where convert.php is located (Joomla root).
6) Go to joomla root dir, then run 'php convert.php file_to_import.csv' (change to your file name).
7) Wait until script will complete execution.
8) Remove temporary jos_users_file_to_import.csv (it was created during execution).

What the script does:
- it creates CSV file in the same directory with prefix jos_users
- it creates temporary unique indexes for 'username' and 'email', so that all new users with the same username or email will be skipped
- it loads jos_users with 'LOAD INTO' command (it is the fastest)
- it recreates access permissions for new added users, so that they should be able to login.


Hope this helps.

Regards,
Arty
Ask Your Own Programming Question
Programmer: Arty, Computer Software Engineer replied 8 years ago
One more note.

You should give (may be temporary) the following permission to your Joomla DB user:

grant file on *.* to 'joomla_user'@'localhost' identified by 'joomla_password';

where joomla_user and joomla_password XXXXX be the same as in your configuration.php. You may grant permissions as 'root' or 'mysql' admin either from command line or from phpMySQL interface. If you don't have mysql admin permissions - let me know, there are some workarounds.

After granting permissions from ssh run: 'mysqladmin reload' - it will reload grant tables;
Ask Your Own Programming Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a programmerLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask Arty Your Own Question
Arty
Arty
Arty, Computer Software Engineer
Category: Programming
Satisfied Customers: 575
575 Satisfied Customers
Experience: 15+ years of programming, C, C++, Java, PHP, awk, ruby, shell, ASM, Forth, Raptor, M.A.R.I.E, Excel

Arty is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed.

One Happy CustomerNew York

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

< Previous | Next >

Meet the Experts:

ATLPROG

ATLPROG

Computer Software Engineer

7,677 satisfied customers

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

LogicPro

Computer Software Engineer

7,175 satisfied customers

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

unvadim

unvadim

Computer Software Engineer

1,168 satisfied customers

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

lifesaver

Computer Software Engineer

950 satisfied customers

Several years of intensive programming and application development experience in various platforms.

ehabtutor

ehabtutor

Computer Software Engineer

936 satisfied customers

Bachelor of computer science, 5+ years experience in software development, software company owner

TheDoctor

TheDoctor

Software Engineer

893 satisfied customers

M.S. in Internet Information Systems

The-PC-Guy

The-PC-Guy

Software Engineer

848 satisfied customers

Extensive Knowledge in PHP, MYSQL, CSS & Javascript

< Previous | Next >

Related Programming Questions
Python 2.7.12 question - how do i write a list containing a
Python 2.7.12 question - how do i write a list containing a certain number of records to a file? The number of records is based on raw input. I need to separate the list into 2 separate files, one con… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
First realize that I am a SQL newbie. We have a phone system
First realize that I am a SQL newbie. We have a phone system based on Asterisk and we are attempting to pull CDR records to our CRM platform. We have limited access to the Asterisk CLI. We have been u… read more
Steve
Steve
Consultant
Bachelor
69 satisfied customers
I have a simple repeatable task that I need a basic database
I have a simple repeatable task that I need a basic database solution for. I currently accomplish this task with Excel using VLOOKUP but Excel is very slow when working with large numbers of records (… read more
Jerubedo
Jerubedo
Software Engineer
Bachelor\u0027s Degree
7 satisfied customers
***For TheDoctor***We have a serious problems and I would
***For TheDoctor*** We have a serious problems and I would like you to debug on the remote server ASAP. The rotaryELC.org database is really messed up. Yes, I know that GoDaddy made someupdates and th… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
893 satisfied customers
I want to fix my website WC3 Validator for each page. I want
I want to fix my website WC3 Validator for each page. I want to know how it is done. It reports the solutions to fix the errors; however, I do not know how to input them. You can go on this link http:… read more
Jinsmn
Jinsmn
Systems Administrator
Diplom
1,260 satisfied customers
My Joomla (1.7.2) website was infected by hackers and I am
My Joomla (1.7.2) website was infected by hackers and I am now having to deal with the result. I have downloaded Joomla 2.5 and understand I need now to upload the unzipped files to my server. My ques… read more
pdheslin
pdheslin
Intuitive Consultant
51 satisfied customers
I added a new combo box to an old userform code. The combo
I added a new combo box to an old userform code. The combo box has a list of csv files. when a user click on a csv file, the existing data in sheet1 content is cleared and the selected file is loaded … read more
John D
John D
Bachelor Degree in Engineering
342 satisfied customers
new question - i created vba code that import five different
new question - i created vba code that import five different csv data files to the same workbook and worksheet -sheet1 . the csv file is loaded into the worksheet -sheet1 which is based on a selected … read more
Ryan-CTech
Ryan-CTech
Manager
279 satisfied customers
I have a new install of MS SQL 2008 R2 running in trial
I have a new install of MS SQL 2008 R2 running in trial mode....I can use the MS SQL manager to create new DBs but I cannot seem to login to it when I try and bring up the test URL that I have setup..… read more
SDSU_GURU
SDSU_GURU
58 satisfied customers
I think I have the code written to read a csv file into an
What I am trying to do is to develop an app that will import 2 csv files into local tables in the app. Allow the user to edit the records. Then generate another csv with the same data but structured d… read more
NY Eng
NY Eng
Control Systems Engineer
Bachelor\u0027s Degree
19 satisfied customers
I am making a Joomla 1.5 website. I already have SOB2 installed
I am making a Joomla 1.5 website. I already have SOB2 installed with a directory of accomodation and restaurants etc. It has a search routine but it's not very attractive or user friendly. I have made… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
Hey Brian, I have to create a mysql database off of the
Hey Brian, I have to create a mysql database off of the form and code we worked on before. When I try to import the data to mysql it gives me an error. Do you know how to transfer over this informatio… read more
Brian H
Brian H
Senior Software Engineer
Master\u0027s Degree
55 satisfied customers
We have a customer that created a website using joomla and
We have a customer that created a website using joomla and they have a Form that their customers will be filling out. We would like the form data to populate a Filemaker Database that we create. How c… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
hi ive got a website buynrg.co.uk and when i try to log in
hi ive got a website buynrg.co.uk and when i try to log in i get this error message Unable to load session storage class: file i use joomla now i cant get into my site administrator… read more
Eljon
Eljon
Software Developer Consultant
Associate Degree
562 satisfied customers
I have a price list in excel with product code, description
I have a price list in excel with product code, description and price in each column. There are around 16,000 lines of product. I now have an updated price list from the manufacturer which features ar… read more
m wells
m wells
Sr. DBA
Associate Degree
3 satisfied customers
I have a command that has been working with an Access database.
I have a command that has been working with an Access database. I am converting the database to MS SQL. Could you tell me what the SQL command would convert to in MS SQL? ACCESS SQL: INSERT INTO [emai… read more
C.Martin
C.Martin
IT Consultant
Bachelor's Degree
453 satisfied customers
I am working in a database that I suspect is nothing more than
I am working in a database that I suspect is nothing more than some type of web hosted application, is there any way that I can tell for sure? The company that is providing the database limits our abi… read more
Cherryl Lewis
Cherryl Lewis
Bachelor's Degree
180 satisfied customers
Only when registered users login by using mod_login Im getting
Only when registered users login by using mod_login I'm getting annoying text (see below) across the top of my pages and all of the font is larger and the template is skewed. No valid database connect… read more
NealZed
NealZed
Bachelor's Degree
48 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x