YAFLogo

reyou
  • reyou
  • 59% (Neutral)
  • YAF Camper Topic Starter
13 years ago
Hi, I want to create yaf forum user out of the user registration page.

because my web site is already using asp.net login control and

i want that system should create also forum user while asp.net login control creating

a user.

Is there a solution for this ?

Thanks.

Sponsor

reyou
  • reyou
  • 59% (Neutral)
  • YAF Camper Topic Starter
13 years ago
ok i found answer myself :

add these namespaces:

using yaf;

using yaf.pages;

protected void CreateForumUserAccount()

{

ForumPage forumPage = new ForumPage();

int PageBoardID = 1;

string UserName = UserNameTextBox.Text;

string Password = PasswordTextBox.Text;

string Email = UserNameTextBox.Text;

string Location = "No location specified";

string HomePage = "http://www.anywebsite.com";

object timeZone = "-300"; // Eastern Time (US & Canada), Bogota, Lima, Quito

DB.user_register(forumPage,

PageBoardID,

UserName,

Password,

Email,

Location,

HomePage,

timeZone,

forumPage.BoardSettings.EmailVerification);

}