• spellstone
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
12 years ago
Hello Friends,

I am facing a issue with the custom login,

i have created a page which allows the user to login from the existing system to the forum directly

the following is the code

String yafPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Value, "md5");

string appName = "YetAnotherForum";

object userKey = YAF.Providers.Profile.DB.GetProviderUserKey(appName, Username.Value);

DataRow yafUser = YAF.Providers.Membership.DB.GetUser(appName, userKey, Username.Value, true);

if (yafUser == null)


// User not registered in YAF forum.

// Register the user now.

YAF.Providers.Membership.DB.CreateUser(appName, Username.Value, yafPassword, "", 0, Email.Value, "", "", true, YAF.Providers.Profile.DB.GetProviderUserKey("YetAnotherForum", Username.Value));

YAF.Providers.Roles.DB.AddUserToRole(appName, Username.Value, "Registered"); System.Web.Security.FormsAuthentication.SetAuthCookie(Username.Value, true);


the cookie is geetting set , however the user he new user thus created is not able to see the forums ( it only shows blank) same with the Active Discussions , if the user has been created by the forums register section then it shows forums

Please advice ( i checked with the tables and there are values present in the users and role membership tables)

10 years ago
Any one can answer the above question?