public ActionResult InitialPwdChange() { ModifyPasswordModel model = new ModifyPasswordModel(); model.UserName = App.Framework.Security.User.Current.UserName; model.UserCode = App.Framework.Security.User.Current.UserCode; return View(model); }
public ActionResult PasswordChange(long? userId) { ModifyPasswordModel model = new ModifyPasswordModel(); if (userId != null && userId !=0) { var user = BusinessPortal.Load<CSC.Business.Entity.User.User>(new GetUser {UserID = userId.Value}); model.UserName = user.UserName; model.UserCode = user.UserCode; }else { model.UserName = App.Framework.Security.User.Current.UserName; model.UserCode = App.Framework.Security.User.Current.UserCode; } return View(model); }
public ActionResult ModifyAuthPwd(CSC.Business.Entity.User.ModifyPasswordModel model) { SecurityPortal.ModifyUserAuthPwd(App.Framework.Security.User.Current.UserId, model.NewAuthPwd, UserExtension.Instance); this.ShowMessage(CSC.Resources.Account.ModifyAuthPwdSuccess, isSucessed: true); model = new ModifyPasswordModel(); model.IsCurrentUser = true; return View("PasswordChange", model); }
public ActionResult ModifyUserAuthPwd(CSC.Business.Entity.User.ModifyPasswordModel model) { int isModify = model.IsModifyUserPwd(Convert.ToInt32(model.UserID)); switch (isModify) { case 0: SecurityPortal.ModifyUserAuthPwd(Convert.ToInt64(model.UserID), model.NewAuthPwd, UserExtension.Instance); this.ShowMessage(CSC.Resources.Account.ModifyAuthPwdSuccess, isSucessed: true); break; case -1: this.ShowMessage(CSC.Resources.Account.CancelModifyAuthPwd, isSucessed: true); break; case -2: this.ShowMessage(CSC.Resources.Account.UserNoExists_Auth, isSucessed: true); break; } model = new ModifyPasswordModel(); model.IsCurrentUser = false; return View("PasswordChange", model); }
public ModifyUserLoginPwdAndAuthPwd(ModifyPasswordModel user) { this.user = user; }
public ModifyUserAuthPwd(ModifyPasswordModel user) { this.user = user; }
public void ModifyUserLoginPwdAndAuthPwd(long userID, string newLoginPwd, string newAuthPwd) { var model = new ModifyPasswordModel() { UserID = userID, LastUpdatedBy = userID }; if (string.IsNullOrEmpty(newLoginPwd) && string.IsNullOrEmpty(newAuthPwd)) { model = new ModifyPasswordModel() { UserID = userID }; } else if (string.IsNullOrEmpty(newLoginPwd)) { model = new ModifyPasswordModel() { UserID = userID, NewAuthPwd = newAuthPwd }; } else if (string.IsNullOrEmpty(newAuthPwd)) { model = new ModifyPasswordModel() { UserID = userID, NewLoginPwd = newAuthPwd, }; } else { model = new ModifyPasswordModel() { UserID = userID, NewLoginPwd = newLoginPwd, NewAuthPwd = newAuthPwd }; } BusinessPortal.Save(model); }
public void ModifyUserLoginPwd(long userID, string newLoginPwd) { ModifyPasswordModel model = new ModifyPasswordModel() { UserID = userID, LastUpdatedBy = App.Framework.Security.User.Current.UserId }; if (!string.IsNullOrEmpty(newLoginPwd)) { model = new ModifyPasswordModel() { UserID = userID, LastUpdatedBy = App.Framework.Security.User.Current.UserId, NewLoginPwd = newLoginPwd, PwdExpiryDate = SecurityPortal.PasswordEffectiveDays }; } BusinessPortal.Save(model); }
public void ModifyUserAuthPwd(long userID, string newAuthPwd) { ModifyPasswordModel model = new ModifyPasswordModel() { UserID = userID, LastUpdatedBy = App.Framework.Security.User.Current.UserId }; if (!string.IsNullOrEmpty(newAuthPwd)) { model = new ModifyPasswordModel() { UserID = userID, LastUpdatedBy = App.Framework.Security.User.Current.UserId, NewAuthPwd = newAuthPwd }; } //BusinessPortal.Save(model); BusinessPortal.Delete(model); }