Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ardarvin patch 1 #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions drupal2wp/inc/Drupal2WordPressDrupalImporter_7.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ private function importMediaForPostID($postID) {
u.fid,
m.uri,
m.filename,
m.origname
m.uri
FROM ".$this->dbSettings['prefix']."file_usage u
LEFT JOIN ".$this->dbSettings['prefix']."file_managed m ON (m.fid = u.fid)
WHERE u.type = 'node'
Expand Down Expand Up @@ -823,16 +823,16 @@ private function _importUsersData($offset, $importLimit) {
foreach($dUsers as $dUser) {
// Check the user role
$wpUserRole = $this->processUserRole($dUser['rid']);
// Only process if we have a user role
// Because Drupal7 doesn't set user roles for subscribers, if no user role set to subscriber
if (!$wpUserRole) {
continue;
$wpUserRole = "subscriber";
}
// Add user, make email login. Empty password to force lost password
$wpdb->insert(
$wpdb->users,
array(
'ID' => $dUser['uid'],
'user_login' => $dUser['mail'],
'user_login' => $dUser['name'],
'user_pass' => '',
'user_nicename' => $dUser['name'],
'user_email' => $dUser['mail'],
Expand Down Expand Up @@ -932,4 +932,4 @@ private function _importUsersData($offset, $importLimit) {
ob_flush(); flush(); // Output
}

}
}