2009-05-31, 10:21 AM
Hi,
today i'm working about a modification for login into the forum, this modification allows you to login with email and not with username.
In the header_welcomblock_guest I replaced this:
But they don't work
today i'm working about a modification for login into the forum, this modification allows you to login with email and not with username.
In the header_welcomblock_guest I replaced this:
<!-- lang.username = "{$lang->login_username}";
with<!-- lang.username = "Email";
and in the file functions_user.php i replaced this:function user_exists($uid)
{
global $db;
$query = $db->simple_select("users", "COUNT(*) as user", "uid='".intval($uid)."'", array('limit' => 1));
if($db->fetch_field($query, 'user') == 1)
{
return true;
}
else
{
return false;
}
}
with this:function user_exists($email)
{
global $db;
$query = $db->simple_select("email", "COUNT(*) as email", "email='".intval($email)."'", array('limit' => 1));
if($db->fetch_field($query, 'email') == 1)
{
return true;
}
else
{
return false;
}
}
But they don't work