Custom email validation
-
Hey,
I want to only allow users from specific domains to register (e.g. only people with @gmail.com emails).
Seems like I can somehow use filter:register.interstitial hook, but not sure exactly how (and it seems I'd have to duplicate all the existing email validation logic).
What's the best way to go about this?
Thanks!
-
@baris Thanks for the quick response!
Not in front of a computer right now, but AFAICT this plugin hooks to the filter:register.check which fires after username and password are provided, but before email is provided (which happens later via interstitials).
Maybe things changed since it was written?What am I missing?
-
@baris IIUC the function registered to filter:register.interstitial adds objects to data.interstitial with template, data and callback.
It seems callback is optional, but template isn't.
I tried using a callback to verify the email to throw an error when it fails, but looks like I have to specify a template (which I don't need).I guess I can try to add an empty template, but I'm wondering if there's a better way.
-