Question

i am new in cakephp.i am developing an application in which there is a login page .. i have a database where the the user email with his number is also stored in the database ... now what i want is in facebook you can login through your email and your phone number too .. so i want this functionality in my application too.. how can i do this in cakephp.how can i check the field in cake php that whether he has typed his phone number or email address.i dont want to add another textbox .. i want to have the same text box for email and phone number

Was it helpful?

Solution

You can use the multi column auth adapter: https://github.com/ceeram/Authenticate/blob/master/Controller/Component/Auth/MultiColumnAuthenticate.php

by defining

'columns' => array('phone_number', 'email'),
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top