steph.hope Posted September 28, 2020 Share Posted September 28, 2020 I'm having an issue with the phone number field in my registrar module. I've turned off the "international phone number automatic formatting" so that I can save phone numbers to the database with the formatting I need (eg 64 7 2222222). However, when the phone numbers are brought into the module as params when doing a registration etc, they are formatted by WHMCS as eg +64.6472222222. The leading country code would be easy enough to take out, but the spaces in the number are important as the registry expects country code, area code and local number to be split out. Is my only option to do a database call to get the unformatted phone number? As long as the Client details are being used for the registration that'll work as I can look them up by email, but if Contact details are used for the domain then there's no unique field available within the domain module to look up the contact's phone number. And there's no way within the module of knowing if it's a Client or a Contact that's being used... Any suggestions? 0 Quote Link to comment Share on other sites More sharing options...
steph.hope Posted September 29, 2020 Author Share Posted September 29, 2020 Anyway, for now I've just gone with looking it up in the database by getting the order id for the domain name, then the user or contact associated with the order. As long as there aren't duplicate records for the domain name, which it seems can happen if an order is created in the admin area, even with the "Block Existing Domains" setting active. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.