Get the App
SLTechnology News&Howtos  ›  Servers  › 

Implementation of login-free interface for dream weaving cms

Shulou Source: shulou.com Published: 2022-06-02 04:30:34 11月12日 Update

Editor to share with you about the implementation of the dream weaving cms login-free interface. I hope you will gain a lot after reading this article. Let's discuss it together.

Dream weaving cms login-free interface how to achieve?

This article introduces the dream weaving cms login-free interface for dedev5.x automatic login code friends who need to know can refer to

The implementation steps are as follows:

Cancel the login prompt that appears when DEDE is not logged in

Automatically log in to DEDE

Modify the code of a DEDE to the config.php of the DEDE program administrator directory. The default path is dede/config.php. The code is as follows:

/ / verify user login status

The code is as follows:

$cuserLogin = new userLogin (); if ($cuserLogin- > getUserID () = =-1) {header ("location:login.php?gotopage=" .urlencode ($dedeNowurl)); exit ();}

The function of this code is to guide the user into the login process if the user's login information is not detected, and modify it as follows:

/ / verify user login status

The code is as follows:

$cuserLogin = new userLogin (); if ($cuserLogin- > getUserID () = =-1) {if ($my_u! =') {$res= $cuserLogin- > checkUser ($my_u, $my_p); if ($res==1) $cuserLogin- > keepUser ();} if ($cuserLogin- > getUserID () = =-1) {header ("location:login.php?gotopage=" .urlencode ($dedeNowurl); exit ();}}

The function of this code is to try to log in using the parameters passed on the page when it detects that the user has not logged in. If the login is successful, save the user's information and do other operations; if the login fails, guide the user to the landing page.

After reading this article, I believe you have a certain understanding of the implementation of the login-free interface of Weaving Dream cms. If you want to know more about it, welcome to follow the industry information channel. Thank you for your reading!

Tags: Login login code user interface method function message status article page test test success parameter done is in more friends step Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi Apple Linux MariaDB