0
votes

I have a website which is using a combination of asp.net forms authentication and my own provider. I would like to add a forum to the site and after a bit of digging around I think phpbb is a good answer. I've set it up, using SQL Server and IIS. What I'd now like to do is programtically add all the existing users from my DB and also create a user when they register on the site.

Does anyone know an easy way to do this? I've not found a good example online yet, hence throwing myself at the mercy of the community. :)

All the best,

Phil.

1

1 Answers

0
votes

What you're trying to do it fairly complicated, but there are a couple ways that it can be simplified:

You mentioned that you're using an SQL server: can this server be accessed from PHP? It would be far easier to loop through your users in PHP, calling the phpBB user_add function (which, by the way, is horrific. Check out this article).

If you cannot access the SQL server through PHP, then it'll get tricky. You'll want to create something like an API for phpBB which you can add users through, and call that through either the PHP CLI or HTTP from your C# application. I don't know C#, but I can help you with the general idea and the phpBB side if you cannot access through SQL.

As I said though, I would strongly recommend accessing the database through PHP.