Collection.php 814 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\User\Model\ResourceModel\Role\User;
  7. /**
  8. * Admin role users collection
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
  13. {
  14. /**
  15. * Initialize resource model
  16. *
  17. * @return void
  18. */
  19. protected function _construct()
  20. {
  21. $this->_init(\Magento\User\Model\User::class, \Magento\User\Model\ResourceModel\User::class);
  22. }
  23. /**
  24. * Initialize select
  25. *
  26. * @return $this
  27. */
  28. protected function _initSelect()
  29. {
  30. parent::_initSelect();
  31. $this->getSelect()->where("user_id > 0");
  32. return $this;
  33. }
  34. }