将用户数据从一种软件复制到另一种软件的模式

发布于 2024-07-12 00:25:21 字数 502 浏览 2 评论 0原文

我有一个与流行论坛软件(phpBB)集成的网站。 我进行了设置,以便自动登录主站点的用户也会登录论坛软件。 我同时通过论坛的 API 进行身份验证来做到这一点。

当有人注册该站点时,一个条目将进入主站点数据库,一个条目将进入论坛用户数据库(使用论坛 API)。

论坛用户表的主ID存储在主站点用户数据库的一列中。 这是在注册时保存的:注册过程首先创建一个论坛用户,然后将 ID 传回到在主站点中创建用户的查询。

当用户登录时,如果他们通过主站点进行身份验证,则会提取该 ID 并将其传递到论坛登录 API 以登录正确的用户。

然而,一件奇怪的事情似乎随机发生:每 30 或 40 名注册者中就有一个最终拥有的论坛用户 ID 在主站点用户表中不属于他们自己。 我知道如何查找这些问题并根据具体情况进行修复,并准备好脚本来执行此操作,但这似乎更像是创可贴,而不是修复。

这是链接这样的数据时的常见问题,还是这看起来像是该软件更具体的问题? 由于这个问题的随机性,很难调试。

I have a website that I've integrated with a popular forum software (phpBB).
I have it setup so users that login to the main site automatically are logged in to the forum software as well. I do this by authenticating through the forum's API at the very same time.

When someone registers for the site, an entry goes in to the main site database and an entry goes in to the forum user database (using the forum API).

The primary id of the forum user table is stored in a column in the main site user DB. This is saved at the time of registration: the registration process first creates a forum user, then passes back the ID in to the query that creates the user in the main site.

When a user logs in, if they authenticate with the main site, that ID is pulled and passed in to the forum login API to login the correct person.

However, a weird thing seems to happen randomly: one in every 30 or 40 people that registers ends up with a forum user id that is not their own in the main site user table. I know how to look for these problems and fix them on case by case basis and have scripts in place to do so, but that seems like more of a bandaid, not a fix.

Is this a common problem when linking data like this, or does this seem like something more specific with the software? Because of the randomness of this issue its been hard to debug.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

貪欢 2024-07-19 00:25:21

我怀疑会话管理。 您是否有意或无意地重复使用会话 ID?

I would suspect Session Management. Are you intentionally or unintentionally reusing session ids?

暮倦 2024-07-19 00:25:21

我已经用 vbulletin 做了类似的事情,直接使用论坛的 mysql 数据库来验证主站点和其他站点(它们都在同一台机器上)...

在您的情况下,我将添加特定于站点的字段不在站点数据库中的 phpBB 数据库中,并通过 user_id 将其链接到 phpbb...这可能是主站点上插入两个数据库的一种形式(一些在主站点数据库中,其他在 phpBB 数据库中 - 带有更多权限字段),我会使用自己的非标准验证码,例如生成扭曲的图像“什么是 x+y”,其中 x 和 y 作为随机数,+ 可能会被其他操作替换,或者“类型”的图像“橙色”一词,或“再次输入您的用户名”

我会禁用默认的 phpBB 注册...有很多机器人知道如何使用它...

这将保证您有一个信息来源,然后您填写一次获得所有信息。

I've done something similar with vbulletin, by directly using the forum's mysql database to autheticate the main site, and other sites (they're all on the same machine)...

In your case, I would add the site-specific fields that are not in phpBB database in the site's db, and link it to phpbb by user_id... It could be one form on the main sites that inserts into the two databases (some in the main site db, others in phpBB db - with some more privileges fields), I'd use my own non-standard captcha like generating a distorted image "what is x+y" with x and y as random numbers and + may be replaced by other operations, or an image of "type the word ORANGE", or "type your username again"

I would disable the default phpBB registration... there are so many bots that know how to use it...

This would guarantee you have one source for the info, and you fill all the info at once.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文