Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
/sitecore
site
web.config
public partial class Login : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { var registerHyperLink = (HyperLink)uxLogin.FindControl("RegisterHyperLink"); registerHyperLink.NavigateUrl = "~/ResourceCenter/Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]); uxLogin.RememberMeSet = false; if (!IsPostBack) { var c = Request.Cookies["username"]; if (c == null) { uxUsernameTextBox.Text = ""; } else { uxUsernameTextBox.Text = c.Value; uxLogin.RememberMeSet = true; } } } protected TextBox uxUsernameTextBox { get { return uxLogin.FindControl("UserName") as TextBox; } } protected void uxLogin_LoggedIn(object sender, EventArgs e) { /*--- Inits ---*/ var url = Request.QueryString["url"]; /*--- Remember/Forget Username ---*/ if (uxLogin.RememberMeSet) Response.SetCookie("username", uxUsernameTextBox.Text, 365); else Response.DeleteCookie("username", Request); /*--- Redirect (?) ---*/ if (url == null) { Response.Redirect("~/"); // Main page for authenticated users } else { var url2 = Server.UrlDecode(url); Response.Redirect(url2); } } private string _usernameEntered = string.Empty; protected void uxLogin_LoggingIn(object sender, LoginCancelEventArgs e) { var domainUser = Sitecore.Context.Domain.GetFullName(uxLogin.UserName); if (System.Web.Security.Membership.GetUser(domainUser) != null) { _usernameEntered = uxLogin.UserName; uxLogin.UserName = domainUser; } } protected void uxLogin_LoginError(object sender, EventArgs e) { uxLogin.UserName = _usernameEntered; } }
/sitecore/Content
/configuration/sitecore/sites/site
loginPage
requireLogin
/configuration/sitecore/settings/setting
sitecore\My Site Administrator
sitecore\Sitecore Client Users
sitecore\Sitecore Client Publishing
/sitecore/content/Documents and Settings/All users/Start menu/Left/Content Editor
/sitecore/content/Applications/Content Editor
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.