Thread: PageBoardID?
View Single Post
Old Feb 4th, 2007, 10:41 PM   #1
Kami
Newbie
 
Join Date: Jan 2005
Posts: 21
Rep Power: 0 Kami is on a distinguished road
PageBoardID?

I am trying to customize an open source BB done in ASP.NET/C# (www.YetAnotherForum.net). The login function has a variable (int) called PageBoardID, but I can't figure out what it is for. It always appears to be 1, regardless of how many browsers I throw at it. I'm thinking about just hard coding this value to 1 for simplicity, but without knowing what it does, I obviously am a little hesitant.

The code for this function is as follows:
string sPassword = FormsAuthentication.HashPasswordForStoringInConfigFile( Password.Text, "md5" );
object userID = DB.user_login( PageBoardID, UserName.Text, sPassword );            

if ( userID != DBNull.Value )
{
	string idName = string.Format( "{0};{1};{2}", userID, PageBoardID, UserName.Text );
	if ( Request.QueryString ["ReturnUrl"] != null )
	{
		FormsAuthentication.RedirectFromLoginPage( idName, AutoLogin.Checked );
	}
	else
	{
		FormsAuthentication.SetAuthCookie( idName, AutoLogin.Checked );
		Forum.Redirect( Pages.forum );
	}
}
else
{
	AddLoadMessage( GetText( "password_error" ) );
}
I know this is pretty vague, but does anyone have any guesses on what this variable is for? After spending hours stepping through the code, I'm having a lot of difficulty figuring out it's purpose ... especially when it always appears to be 1.

Thanks in advance.

Last edited by Kami; Feb 4th, 2007 at 11:06 PM.
Kami is offline   Reply With Quote