自定义站点上的phpBB密码验证

时间:2012-06-18 19:35:23

标签: authentication passwords phpbb

我一直在寻找过去几个小时如何在自定义网站上使用phpBB登录脚本。我想我只是在寻找合适的东西。

不久前,我创建了一个phpBB网站,并通过phpBB注册了900多名会员。我目前正在改造这个网站并重做用户注册以及我拥有的所有其他自定义代码。

我的问题是,我希望用户能够像往常一样登录,虽然我想将它们输入到我的新数据库中,这样一切都可以顺利运行。我主要需要他们的用户名,密码和旧ID#,但我不知道如何使用phpBB的密码验证或在哪里找到它

声明需要看起来像这样:

On Login, grab username and password variables:
    if the username is not in MY database, check phpBB database.  
        If the username is in phpBB database, check to see if the password is correct **(This is the part I don't know how to do)**
            If the password is correct, input the username, user ID and the password (encrypted my way) into MY database
                Login
            If the password is incorrect - error
        if the username is NOT in phpBB database - continue
    if the username is not in MY database - input username and encrypted pass into my DB
        login

在哪里可以找到验证phpBB用户密码的脚本?我不在乎脚本是如何完成的,我知道这是一个秘密,我只需要能够验证密码,以便我可以确保它是同一个用户

我可以访问phpBB数据库,我只需要一种方法来验证他们的密码

1 个答案:

答案 0 :(得分:0)

我宁愿删除问题,但这是答案:

点击此处:http://sunnyis.me/blog/secure-passwords/

当您下载PasswordHash.php时,将所有$ P $更改为$ H $。它会工作。奇怪的是它如何创建密码,每次创建时都会有所不同。但是它的CHECK部分确保它正确地检查它,无论它产生什么样的散列传递。