Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Shannon 148 posts 171 karma points
    Mar 05, 2011 @ 04:33

    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.

    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);

    Anyone have any suggestions on how to convert it to use the Umbraco API and return the Userid?

  • Jan Skovgaard 11263 posts 23588 karma points MVP 8x admin c-trib
    Mar 07, 2011 @ 17:53
    Jan Skovgaard

    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?


Please Sign in or register to post replies

Write your reply to: