dede限制注册 用户登陆提示不合法的解决方法
时间:2019-11-14 11:56:03 来源:未知 作者:站长技术网 点击:次
系统的原意是限制注册,但是已经注册过的用户名却也无法登录了,管理员也无法在前台登录! 1
if ($cfg_mb_notallow != '' )
2
{
3
$nas = explode( ',' ,$cfg_mb_notallow);
4
if (in_array($uid,$nas))
5
{
6
return $msgtitle. '为系统禁止的标识!' ;
7
}
8
}
9
复制代码
再找到以下代码:1
if ($ckhas)
2
{
3
$row = $dsql->GetOne( "Select * From `dede_member` where userid like '$uid' " );
4
if (is_array($row)) return $msgtitle. "已经存在!" ;
5
}
6
复制代码
改为:01
if ($ckhas)
02
{
03
if ($cfg_mb_notallow != '' )
04
{
05
$nas = explode( ',' ,$cfg_mb_notallow);
06
if (in_array($uid,$nas))
07
{
08
return $msgtitle. '为系统禁止的标识!' ;
09
}
10
}
11
$row = $dsql->GetOne( "Select * From `dede_member` where userid like '$uid' " );
12
if (is_array($row)) return $msgtitle. "已经存在!" ;
13
}
14
复制代码
修改后admin登录出现提示:管理员帐号不能从前台登录,这是正确的提示,这样就解决了修改了限制注册的信息后,以前注册的用户不能登录的问题! |