1

I need to batch create lots of users and I have their emails and some profile details like phone number and address. This data is in a google sheet. I just need to generate usernames and set initial passwords for them before sending login credentials to their email. Security is not a concern. How can I do this programmatically?

  1. Can I use phpmyadmin to directly insert rows into the #__users and the #__user_usergroup_map tables? The password in the table is hashed, I have no idea how hard it would be to hash a password string and insert it into the table. Besides, what should I do with the id column? Can I just find the largest id number and then simply ++ for each user to be imported?

  2. Does Joomla have a class or function that offers this simple utility like JUser::addNewUser($username, $password, $email) so that I can just write some simple code to retrieve data from google sheet and feed it into a helper function like above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.