How to Programmatically Check if Customer Account is Confirmed or not in Magento 2

Never miss Magento tips, tricks, tutorials, and news.
Use the above solution and stop the unauthenticated user in your store or else, you could just use the Magento 2 Restrict Fake Registration extension!
That’s all!
The below code is the method for the same:

Method to Programmatically Check if Customer Account is Confirmed or not in Magento 2

Magento 2 store owners tend to collect customers’ data for various purposes such as marketing, understanding customers’ behaviour and shopping pattern, or simply offer a better user experience.

Any doubts about the topic can be mentioned in the Comments section below. I’d be happy to help.

  • account_confirmation_required
  • account_confirmed
  • account_confirmation_not_required

Something went wrong.
Use the below code in the helper file.
Thank you for subscribing.
Also, please share the tutorial with the Magento community via social media.
isAccountConfirmed() function returns result as :

Get Weekly Updates

However, when you programmatically login customer without a password, in that case even if the email is not confirmed, the customer can log in. In this situation, you need to programmatically check if customer account is confirmed or not in Magento 2.

Apart from collecting customers’ data is to collect their Email ID while registering with Magento 2 store. Every store owner usually confirms if the given Email ID is correct or not.
Thank you.

/**/

/*.mfp-bg{background:#000000d4}
/*]]>*/

/*.mfp-bg.mfp-ready{opacity:.6}
/*]]>*/

(based on 1 Reviews)