1

I'd like to ask for the fastest way to get the column value of 'is_active' from 'customer_entity' table. It could be using object_manager or something.

Thank you in advance

2
0

Can you try fetching user using Collection?

// include customer collection
use Magento\Customer\Model\ResourceModel\Customer\Collection;

// inject in your class
public function __construct(
        Collection $collection
)


$customer = $this->collection->getItemById(6); // change this number please to match yours
var_dump($customer->getData('is_active'));

1
  • Its undefined method getData()
    – Sam
    Sep 21 '20 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.