![]() |
Register/Add New User
Register new user
Hi, I have my web application (ASP.Net & MS SQL Server) where in any user can register himself and create his account. I want to create same user in my vBulletin forum as soon as he registers in my web application. Does any one know how to achieve this task? Regards, Krunal |
|
how do I call this from c#.net?
|
I was able to do this actually. I'll try to get a blog post to show this. It was actually quite involved. I had to have c# call a web page, then read the response. The web page of course was the php script. The php script take in the variables like the username, password, email, etc.. then used the tutorial in the link. The php script would return a xml file containing whether the user creation was successful or not. It would also contain stuff like the new userid, hashed password, salt, etc.. basically anything you would need on the .NET side.
I still haven't solved scenarios where the user changes his info in vb (password, username,email, etc..). Since the changes will be present in MySQL and not MSSQL. I was thinking of using hooks and then having php push the changes onto .NET. Are you by any chance doing this in the MVC framework? |
What about an easier approach like calling some sort of stored procedure to do this. Or better yet, are there any business objects out there that can be called to handle this?
|
Do you see the issue in this though? Your biggest issue is keeping the MSSQL server in sync with the MySQL server. vBulletin does not work on MSSQL. As far as stored procedures, I would recommend against this. You have the potential to really mess up the database. It's better to pass the data to vb and then have vb validate the data and do the necessary sql queries. I think it's a bit more involved than a simple INSERT query.
I don't know what you mean by business objects. |
I was thinking more of a stored procedure that was written by VB. If none exists, then I would drop that as an option.
When I say business objects I'm referring to DLL's specifically written to carry out many of these functions. Call the method on the DLL for adding a new user, pass the parameters and then get a result code/message. Our application uses these DLL's to carry out many of the common functions. Typically when people refer to a three tier architecture they mean database layer, application or business object layer(dll's) and client (UI). The nice thing about this middle application tier is that you can later create a different client (web, rich windows, mobile) and still use the same objects so as you said the database is always treated the same for common functions. |
vB doesn't use as stored procedures mostly because it has to support different versions of Mysql. Not all versions of mysql support stored procedures. (mysql is very primitive in comparison to mssql in relation to some features). vb is written in php, you can't have DLL's, the best business object you use is the vb database model objects.
Look at the link Code:
$newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); I don't think you are using the MVC framework, you should check it out. http://www.asp.net/mvc/ |
Quote:
|
Quote:
The xml file doesnt contain the password, since on C# side it knows how to hash it. |
All times are GMT. The time now is 07:10 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|