Discuz Login interface Success, jump to the first page does not show the login success status

Source: Internet
Author: User
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?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.