I have created a custom login for users to log using their facebook credentials. After I get the details, send them to a custom Action Method "RegisterFacebookTemplate" in my MVC application. Then I save the member using umbraco Member API.
My problem is after I save the new member to the Database, It will not update the site with logged member.
my action method is as below,
[HttpPost]
public ActionResult RegisterFacebookTemplate(string Oid)
{
if (Member.GetMemberFromEmail("[email protected]") == null)
{
MemberType memberType = MemberType.GetByAlias("customMember");
Member newMember = Member.MakeNew("yohan", memberType, new umbraco.BusinessLogic.User(0));
newMember.Email = "[email protected]";
newMember.Password = "12345678";
newMember.LoginName = "yohan";
newMember.getProperty("gender").Value = "Male"; //set value of property with alias
newMember.getProperty("age").Value = "31"; //set value of property with alias
newMember.Save();
Response.Cookies.Remove(FormsAuthentication.FormsCookieName);
FormsAuthentication.SetAuthCookie("yohan", false);
}
return RedirectToRoute("/");
}
Facebook Login For Members
Hi,
I have created a custom login for users to log using their facebook credentials. After I get the details, send them to a custom Action Method "RegisterFacebookTemplate" in my MVC application. Then I save the member using umbraco Member API.
My problem is after I save the new member to the Database, It will not update the site with logged member.
my action method is as below,
is working on a reply...