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

3
  • Just so you know, is_active does nothing. magento.stackexchange.com/questions/1069/… Commented Sep 20, 2020 at 21:03
  • @RomanKabanov Yeah im using the column for my custom feature
    – Sam
    Commented Sep 21, 2020 at 0:19
  • did you manage to do what you needed? I am looking for something similar
    – Vlad Patru
    Commented Nov 10, 2022 at 8:50

1 Answer 1

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
    Commented Sep 21, 2020 at 0:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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