我如何在核心 php 中创建 pyrocms 登录模块


How i can create pyrocms login module in core php?

我已经在火山中开发了一个Web应用程序,并且运行良好。现在我想按照我的客户的要求,在核心 php 中创建这个网站的移动版本。我已经做了几乎,但在核心 php 中创建登录模块时面临问题,因为我希望能够使用 pyrocms 主站点创建的用户。因此,请告诉我如何在核心 php 中创建与 pyrocms 登录相同的登录功能。

login模块驻

留在cms/users模块中。

它基于 ION 身份验证库,您可以从中获取相关功能。您需要确保通过 cms/users/config 保持所有配置选项相同。

Codeigniter是一个非常轻量级和快速的框架。用核心 PHP 编写代码并不能确保网站更快;它只会使维护和升级它变得更加困难和漫长。

必要性是所有发明之母...:)

最后我做到了..有几个步骤..

1. Get the email and password from login form.
2. Select user detail from default_users detail using emailid.
3. Calcuate the encrypted password using  password  and salt in this `sha1($password . $salt)`
4. Check the encrypted password value with db password value..

这是工作代码。

$result = fetchuserdetail($email);
            while($row = mysql_fetch_object($result))
                    {
                         $dbpassword =  $row->password;
                         $salt =  $row->salt;
                         $userid =  $row->id;
                    }
            $encrypassword = sha1($password . $salt);
            if($encrypassword == $dbpassword)
            {
                $_SESSION['user_logged_in'] = TRUE;     
                $_SESSION['user_logged_id'] = $userid;                  
                header("Location:$refer");
            }
            else
            {
                $_SESSION['email'] = $email;
                $_SESSION['password'] = $password;
                $_SESSION['loginerro'] = "Please fill the login detail";
                header('Location:login.php');
            }

希望这会帮助某人....感谢您抽出时间回答这个问题。