Advertisement
Guest User

Untitled

a guest
May 31st, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Drupal\custom\Plugin\migrate\source\d7;
  4.  
  5. use Drupal\user\Plugin\migrate\source\d7\User as D7User;
  6.  
  7.  
  8. /**
  9. * Drupal 7 user source from database.
  10. *
  11. * @MigrateDrupalSource(
  12. * id = "custom_d7_user"
  13. * )
  14. */
  15. class User extends D7User {
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function query() {
  20. $query = $this->select('users', 'u');
  21. $query->join('users_roles', 'ur', 'ur.uid = u.uid');
  22. $query->fields('u')
  23. ->condition('u.uid', 0, '>');
  24. ->condition('ur.rid' array(1,2,3,4), 'NOT IN');
  25. return $query;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement