UCH2.0绿色完美支持邮箱登陆(免费)
UCH2.0绿色完美支持邮箱登陆(免费)找到 source/do_login.php$password = $_POST['password'];
$username = $_POST['username'];
$cookietime = intval($_POST['cookietime']);在下面加入:if (isemail($username)) {
$sqlgetuser = "SELECT uid,email,emailcheck FROM ".tname("spacefield")." WHERE email='$username'";
$querygetuser = $_SGLOBAL['db']->query($sqlgetuser);
$getuserid = $_SGLOBAL['db']->fetch_array($querygetuser);
if ($getuserid['emailcheck'] == 0 && $_SGLOBAL['db']->num_rows($querygetuser) != 0) {
showmessage('email_unchecked', 'do.php?ac='.$_SCONFIG['login_action']);
}
$getuserid = $getuserid['uid'];
$sqlgetuser = "SELECT uid,username FROM ".tname("space")." WHERE uid='$getuserid'";
$querygetuser = $_SGLOBAL['db']->query($sqlgetuser);
$getusername = $_SGLOBAL['db']->fetch_array($querygetuser);
$username = trim($getusername['username']);
}//找到 language/lang_showmessage.php
在里面添加'email_unchecked' 对应的提示信息(根据自身要求写)
然后修改登录提示修改之前请备份
template/default/index.htm
找到<p><label for="username">用户名</label> <input type="text" name="username" id="username" class="t_input" value="$membername" /></p>替换为<p><label for="username">帐 号</label> <input type="text" name="username" id="username" class="t_input" value="用户名或Email" onfocus="if (value =='用户名或Email'){value =''}" onblur="if (value ==''){value='用户名或Email'}" /></p>template/default/do_login.htm
找到<tr><th width="100"><label for="username">用户名</label></th><td><input type="text" name="username" id="username" class="t_input" value="$membername" tabindex="2" /></td></tr>替换为<tr><th width="100"><label for="username">帐 号</label></th><td><input type="text" name="username" id="username" class="t_input" value="用户名或Email" onfocus="if (value =='用户名或Email'){value =''}" onblur="if (value ==''){value='用户名或Email'}" tabindex="2" /></td></tr>
页:
[1]