Discuz Login interface Success, jump to the first page does not show the login success status.
The login interface code is as follows
$usernames = $_get["username"];
$passwords = $_get["password"];
List ($uid, $username, $password, $email) = Uc_user_login ($usernames, $passwords);
if ($uid > 0) {
echo '登录成功';echo uc_user_synlogin($uid);setcookie('uid',$uid);header("Location: http://localhost/discuz/upload/forum.php");
} elseif ($uid = =-1) {
echo '用户不存在,或者被删除';
} elseif ($uid = =-2) {
echo '密码错';
} else {
echo '未定义';
}
Do you have a great God? Help me look.
Reply content:
Discuz Login interface Success, jump to the first page does not show the login success status.
The login interface code is as follows
$usernames = $_get["username"];
$passwords = $_get["password"];
List ($uid, $username, $password, $email) = Uc_user_login ($usernames, $passwords);
if ($uid > 0) {
echo '登录成功';echo uc_user_synlogin($uid);setcookie('uid',$uid);header("Location: http://localhost/discuz/upload/forum.php");
} elseif ($uid = =-1) {
echo '用户不存在,或者被删除';
} elseif ($uid = =-2) {
echo '密码错';
} else {
echo '未定义';
}
Do you have a great God? Help me look.
Don't you know what the interface is?
The interface just gives you the data to manipulate, the data to interact with.
Do not record session or cookies, and so on your own to judge, login success will be UID or username stored in the session, you need to complete.
Get User Data
array uc_get_user(string username [, bool isuid])
etc……
What do you do with other functions?
Ok?