11-24-2016, 04:50 AM
So I'm trying to get users registered and verified using either their email or phone number. Two things I'm wondering what direction to go depending on UserSpice design:
1- Should I just store the user's mobile number under "username" and set the below in User.php and build a separate path for verification?
if(is_numeric($user)){
$field = 'username';
2- Store the user's mobile number under "email" and build additional logic on top of the existing email verification code that uses a SMS API, instead of email, to verify the mobile?
What route would you guys go? I guess if we wanted to properly store values, I would go for a 3rd option to store the mobile phone under "billing_phone" and just build everything required for that from scratch... But trying to keep it simple here.
1- Should I just store the user's mobile number under "username" and set the below in User.php and build a separate path for verification?
if(is_numeric($user)){
$field = 'username';
2- Store the user's mobile number under "email" and build additional logic on top of the existing email verification code that uses a SMS API, instead of email, to verify the mobile?
What route would you guys go? I guess if we wanted to properly store values, I would go for a 3rd option to store the mobile phone under "billing_phone" and just build everything required for that from scratch... But trying to keep it simple here.