Create Drupal User for each CiviCRM Contact - drupal

I've been having such a rough time trying to figure this out. I've found a few sources that hint about getting this done, but nothing has explicitly say HOW to make it happen. Hopefully someone here can help.
I've got Drupal 7 running with CiviCRM 4.4, with contacts already imported. That part is good, I've got that completely understood.
What I'm trying to do is create a new Drupal User Account for each of the CiviCRM contacts. One path I went down was to install the Feeds and Feeds Import modules to import users via a CSV file. From there, I went to CiviCRM, exported a user list as CSV, and tried importing it via the Feeds Import module ----- Nope, didn't work. Apparently the format was not correct. I would be fine going through and editing each record, if not for my having 900+ Contacts that need accounts.
There must be a better way, as I'm sure this is something that surely has to have been done many times over by other users. Can anyone offer me any assistance on how to create a Drupal User Account for each of my CiviCRM contacts?

Apparently the fine folks at CiviCRM have already solved this problem. Here's a link for anyone who runs into the same fix I found myself in: https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and

user161592 seems to have the best answer if you are using Drupal 7. The technique at https://civicrm.org/blog/petednz/creating-drupal-users-made-easy-for-single-or-multiple-contacts-via-civi-imports-and requires the civicrm_entity module, which only works for Drupal 7.
For Drupal 6, you can use the user import module: https://www.drupal.org/project/user_import
This requires you to search the civicrm DB for the users for whom to create an account, export the users (choosing the field list for the fields you will need in the Drupal account creation), then flip the Drupal side and import the resulting .csv file with the user import module.
So it requires some admin intervention each time you want to do it, but it does work quite well and does not take long to do once it is all set up (you can save the field set in CiviCRM and the import set up in the user import module - so repeating the same type of import is pretty easy).

I had to add the following to the import script to import properly:
"username_format" : "first.middle.last"
Paste this just below the signin definition.

Related

Import / Export comments on Wordpress site

A few months ago I created a staging Wordpress site to implement some changes on my website. The databases run on phpMyAdmin (although I'm not sure if this is relevant). I would like to save the comments (the ones that are already published and the ones I've received recently), so my plan is to save them as it follows:
Save all comments and disallowed IPs from the regular website. I believe this is done by downloading the Commentmeta and Comment databases, although I'm not 100% sure. Are there other relevant databases?
Import those comments to the staging site.
Export the whole staging site (databases and webspace) to the regular website and let it run all the updates.
If this isn't the right way to do it or you know a better / more effective / safer method I'd appreciate to know it.
I'm trying to locate the file in which the Comment Blacklist / Disallowed List of my website is stored. I don't use any comment plugins besides the Subscribe to Comments Reloaded, although I don't think this one would store the data I'm looking for.
I'm fairly new to web developing, but I'm not sure if this file should be on a specific database or on a certain folder of the webspace, so all insights are welcome and much appreciated!

Active Directory Authentication in Wordpress and user data import

I am currently working on a project with Wordpress. I have to authenticate the users via Active Directory Database and import some data so while filling the form they will not have to fill again some of the information like name etc...in that form. I'm looking for a solution, if there is a plugin in Wordpress that will allow me doing that or if there is a step by step process to solve this I'll be grateful.
Thanks a lot !

Import data from old website into new drupal website having diffrent schema

I want to import data from an old website into a new Drupal-based website. Both do have a completely different database schema. Can anybody help how can I do that?
Check out on the Migrate module:
https://www.drupal.org/project/migrate
It can import from any kind of DB organization, if you define import rules, but there are also some sub-modules of this module, specialized for i.e. importing from WordPress or another Drupal site, Typo site and similar.

Wordpress migration to a new developed webpage

Case:
A old website developed with wordpress and run for serveral years.
Now, this wordpress website is giveup and will be re-developed to a new website which is not using wordpress anymore.
Old data i.e. article content, uploaded image file, members' info etc will be migrated to the new website.
Question:
1. Is it any tools for this type of migration?
2. If there is no tool for data transfer and I need to export the content from mysql, where can I get the article content in database?
3. Where can I find the uploaded file?
Data migration is always dependant on two things.
1. If your current framework/CMS can export the data you have, and
2. If the new framework/CMS can import data that you have just exported.
Since both frameworks are different, i.e. WordPress to any other CMS, your new CMS must be able to map the exported XML files. Which means, it must be able to customize the import process to tell what bits of data is Title, Content, Categories etc.
To answer your questions
Is it any tools for this type of migration?
Since you didn't mention what you new framework is, no one can really suggest a tool. Just google for "WordPress to YOUR-NEW-FRAMEWORK migraiton" and you'll get a number of tools. If the new framework is a custom PHP framework then I think you'll have to import the data manually or code an import script for it.
WordPress has a pretty good export tool. Check this page to learn how to export WordPress content.
Where can I find the uploaded file?
The uploaded files are referenced in the exported XML file, so at the time of import anywhere else, they can be fetched and downloaded if you can. Otherwise, you can find them in the uploads directory located at YOUR-SITE-ROOT/wp-content/uploads/
UPDATE:
As you are not targetting any framework/CMS but want to show the data with custom PHP, I'd suggest two methods.
Use the current database that WordPress is using and build your PHP script around it, benefiting from wp_posts and wp_postmeta tables.
A better way to go with this is using the WP REST API. This way, you keep the WordPress installation as is and still use it's data in your custom PHP site. Advantage of this method is that you won't have to bug your mind with scripting around database structures you have less information of.

importing content into drupal

I have a wordpress site with 5k post and each post has average 25 comments. so 125k total nodes have to be added.
I need import those posts and comments into drupal 6 .
I have written a script to import those post/comments into drupal by drupal's cron service.
but the cron service keeps time out. because import 125k nodes one by one is very slow.
what can i do to imporve drupal importing speed?
i am use drupal built in node_save(), comment_save() method to do it.
I have not find out a way to use customized SQL query to increase importing speed yet.
I am execute my script through drupals's cron.php, that mean even i have set 'max_execute_time' to unlimited, but that only affects PHP , apache server has it own time out setting.
PS:
comment is not node in drupal, but that mean, there are still a lot of comment_save() be called, that make this importing process very slow.
Have you looked at the Wordpress Import Module?
http://drupal.org/project/wordpress_import
Usually in Drupal, someone has already done whatever you're looking for, wrote a tutorial, and 5 people have created a module to do the same exact thing. :D

Resources