/// <summary> /// Create a new User object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="login">Initial value of the Login property.</param> /// <param name="lastName">Initial value of the LastName property.</param> /// <param name="firstName">Initial value of the FirstName property.</param> /// <param name="password">Initial value of the Password property.</param> /// <param name="alterPasswordFlag">Initial value of the AlterPasswordFlag property.</param> public static User CreateUser(global::System.Decimal id, global::System.String login, global::System.String lastName, global::System.String firstName, global::System.String password, global::System.String alterPasswordFlag) { User user = new User(); user.ID = id; user.Login = login; user.LastName = lastName; user.FirstName = firstName; user.Password = password; user.AlterPasswordFlag = alterPasswordFlag; return user; }
/// <summary> /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUsers(User user) { base.AddObject("Users", user); }
protected void AuthorizeUser(User user, bool remember) { // //this stuff is unpacked in CstBaseController OnAuthorization //string userData = CustomPrincipalSerializeModel.SerializeFromUser(user); //FormsAuthenticationTicket authTicket = new FormsAuthenticationTicket( // 1, // user.Login, // DateTime.Now, // DateTime.Now.AddMinutes(15), // false, // userData); //string encTicket = FormsAuthentication.Encrypt(authTicket); //HttpCookie faCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encTicket); //Response.Cookies.Add(faCookie); FormsAuthentication.SetAuthCookie(user.GetLoginUpper(), remember); }