Fix an Opencart Extension that someone wrote for me

Job ID: 32001685

Budget: £20 – £250 GBP

A freelancer on here has written a custom extension for Opencart for us. However he has let me down badly and has left the extension with an error that I'm pretty sure can be fixed easily and quickly. However it's slightly above my expertise.

Here's what the extension does:
- The whole site is restricted to registered and approved users only apart from register/login screen.
- There is a whitelist of domain names in the admin (e.g. gmail.com, microsoft.com, etc.)
- When someone registers with the cart, their email address is checked against the whitelisted domains
- The user is first asked to confirm their email address by clicking on a link
- If the registrant ISN'T on the whitelist then they are informed that they'll be verified by admin
- Admin goes into the backend and accepts or denies access to the registrant after checking their details
- If the registrant IS on the whitelist and they've verified their account they are automatically approved
- Once the registrant is approved (either by whitelist or manually) they can browse the store and purchase products.
- Each stage of the process has the registrant and admin emailed with templated emails throughout.

Here's the bug that's happening:
- Earlier in the process it worked perfectly, but now for some reason it's not recognising when a registrant is whitelisted and pushes them through the non-whitelist route, even though their email could be bill at gmail dot com and gmail.com is on the whitelist.

So I literally just need this specific part fixing so it takes registrants who enter an email that's on the whitelist through the whitelisted route. It did work, but now it doesn't. I can't see it taking more than a couple of hours if you know what you're doing.

I've been heavily messed around by the previous freelancer and the job has run WAY over time so this is a matter of urgency and needs to be done immediately. As soon as I can see it's fixed on the live site I will release payment.

The opencart version is 3.0.3.7 and php 7.3.
Related categories: PHP JavaScript MySQL HTML Open Cart