• agrodude
  • 53% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Hi guys,

I'm trying to integrate YAF with my site...bet you haven't heard this one before!!lol

I have added the Register stored procedure to my custom registration page for my site so that bot my db and the yaf one get uploaded with the same login credentials.

However, the YAF site seems to encrypt the password somehow so when I pass in the clear text password, the actual password gets stuck in the database. When the user goes to login, this obviously causes an issue.

Please could you give me a pointer to which function/method does the encryption and where is it called from? (I cant see it on the registration page)

I have downloaded the latest version of the site (April 2008).

Cheers for the help


  • Jaben
  • 100% (Exalted)
  • YAF Developer
15 years ago
string sPassword = FormsAuthentication.HashPasswordForStoringInConfigFile( Password.Text, "md5" );
  • agrodude
  • 53% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Thanks Jaben,

This clears it up for me now.

I've successfully entered the password into the database now using the same method in VB.

Just need to make my logon screen generate the authentication cookie for the forum then I'm done.


  • Degeim
  • 57.2% (Neutral)
  • YAF Camper
15 years ago
Could someone please tell me why I can't get this to work?


using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["yafnet"].ConnectionString))

SqlCommand command = new SqlCommand("yaf_user_login", conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.AddWithValue("@BoardID", 1);
command.Parameters.AddWithValue("@Name", User);
command.Parameters.AddWithValue("@Password", Password);


It's always returning "-1", even when I know that both the username and password are correct. Shouldn't it return 1 when the correct login information was submitted?

(I've tried with "FormsAuthentication.HashPasswordForStoringInConfigFile(Password, "md5" )" instead of "Password", and I've tried with "yaf_user_login @BoardID, @Name, @Password" as command, but nothing seems to work. I know that the connectionstring is alright, since I can easily SELECT Name FROM yaf_User and retrieve all usernames.)

I hope somebody can help me!
YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button