Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
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
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:10 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC