Email as a username login in joomla:
Change the file names:

1)Joomla/libraries/joomla/user/helper.php file

function getUserId($username)
{
// Initialize some variables
$db = & JFactory::getDBO();

// $query = ‘SELECT id FROM #__users WHERE username = ‘ . $db->Quote( $username );

//Replace username as email

$query = ‘SELECT id FROM #__users WHERE email = ‘ . $db->Quote( $username );
$db->setQuery($query, 0, 1);
return $db->loadResult();
}
2)joomla/plugins/authentication/joomla.php file

$db =& JFactory::getDBO();

$query = ‘SELECT `id`, `password`, `gid`’
. ‘ FROM `#__users`’
. ‘ WHERE username=’ . $db->Quote( $credentials[‘username’] )
;
$db->setQuery( $query );
$result = $db->loadObject();

Replace the code:

$db =& JFactory::getDBO();

$query = ‘SELECT `id`, `password`, `gid`’
. ‘ FROM `#__users`’
. ‘ WHERE email=’ . $db->Quote( $credentials[‘username’] )
;
$db->setQuery( $query );
$result = $db->loadObject();