Override Mage_Customer_AccountController to your local module and update loginPostAction function with below code.
......
if ($this->getRequest()->isPost()) {
$login = $this->getRequest()->getPost('login');
// NEW CODE ADDED
$phoneNumber = $login['username'];
$customer = Mage::getResourceModel('customer/address_collection')
->addAttributeToSelect('telephone')
->addAttributeToFilter('telephone', $phoneNumber)
->getFirstItem()->getCustomer();
if ($customer !== false) {
$login['username'] = $customer->getEmail();
}else{
$login['username'] = $phoneNumber;
}
// NEW CODE COMPLETED
.......
......
if ($this->getRequest()->isPost()) {
$login = $this->getRequest()->getPost('login');
// NEW CODE ADDED
$phoneNumber = $login['username'];
$customer = Mage::getResourceModel('customer/address_collection')
->addAttributeToSelect('telephone')
->addAttributeToFilter('telephone', $phoneNumber)
->getFirstItem()->getCustomer();
if ($customer !== false) {
$login['username'] = $customer->getEmail();
}else{
$login['username'] = $phoneNumber;
}
// NEW CODE COMPLETED
.......