function pmperson_migrate_email_missmatch_count in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_missmatch_count()
- 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_missmatch_count()
Gets count of email conflicts between pmperson nad drupal user.
1 call to pmperson_migrate_email_missmatch_count()
- pmperson_migrate_update_could_be_performed in pmperson/
includes/ pmperson.migrate.inc - Checks for conflicts that would affect the running of update.php.
File
- pmperson/
includes/ pmperson.migrate.inc, line 120 - Migration functions for the PM Person module.
Code
function pmperson_migrate_email_missmatch_count() {
$results = db_query(" SELECT pm.nid FROM {pmperson} as pm\n LEFT JOIN {users} as u\n ON pm.user_uid = u.uid\n WHERE pm.email <> u.mail AND u.mail <> ''");
$count = $results
->rowCount();
$results = db_query(" SELECT pm.nid FROM {pmperson} as pm\n LEFT JOIN {users} as u\n ON pm.user_uid <> u.uid\n WHERE pm.email = u.mail AND pm.user_uid = '0'");
$count += $results
->rowCount();
return $count;
}