Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a page that basicly accepts the username/passwoord in a query string and returns the userid.
http://www.pastie.org/private/6dkfb9k7rl2oxwzoawwdkw
using System;using CommunityServer;using CommunityServer.Components;namespace CommunityServerWeb.speedtrap{ public partial class login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["un"] != null && Request.QueryString["pw"] != null) { string username = Request.QueryString["un"]; string password = Request.QueryString["pw"]; User userToLogin = new User(); userToLogin.Username = username; userToLogin.Password = password; LoginUserStatus loginStatus = Users.ValidUser(userToLogin); if (loginStatus == LoginUserStatus.Success) { Response.Write( CSContext.Current.User.UserID); } else { Response.Write(loginStatus.ToString()); } } } }}
Anyone have any suggestions on how to convert it to use the Umbraco API and return the Userid?
Hi Shannon
I guess you should be able to use any membership provider you fancy...but must admit I don't know how to use the above in an Umbraco context - But since Umbraco is using the ASP.NET membership provider this should perhaps be easy to achieve?
/Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Converting a login page to use Umbraco from Community Server
I have a page that basicly accepts the username/passwoord in a query string and returns the userid.
http://www.pastie.org/private/6dkfb9k7rl2oxwzoawwdkw
Anyone have any suggestions on how to convert it to use the Umbraco API and return the Userid?
Hi Shannon
I guess you should be able to use any membership provider you fancy...but must admit I don't know how to use the above in an Umbraco context - But since Umbraco is using the ASP.NET membership provider this should perhaps be easy to achieve?
/Jan
is working on a reply...