public ActionResult ModifyPwd(password model) { if(ModelState.IsValid) { 用户管理.修改登录密码<专家>(currentUser.Id,model.Pwd); return Content("<script>alert('修改密码成功');window.location='/登录/LogOut';</script>"); } else { return Content("<script>alert('两次密码不一致');window.location='/专家后台/Modify_PWD';</script>"); } }
public HttpResponseMessage ChangePassword( password pwd) { if (pwd.newPassword != pwd.secondPassword) { return PageHelper.toJson(PageHelper.ReturnValue(false, "两次密码不一致")); } var user =(UserBase) _workContext.CurrentUser; if (user!=null && PasswordHelper.ValidatePasswordHashed(user,pwd.oldPassword)) { PasswordHelper.SetPasswordHashed(user, pwd.newPassword); _userService.ModifyUser(user); return PageHelper.toJson(PageHelper.ReturnValue(true,"数据更新成功!")); } return PageHelper.toJson(PageHelper.ReturnValue(false, "数据更新失败!")); }
protected void Button1_Click(object sender, EventArgs e) { password lObj = new password(); DataTable da = new DataTable(); int check; check = lObj.mobile_check(TextBox1.Text, TextBox2.Text, out da); if (check == 1) { changepassword cp = new changepassword(); cp.update(TextBox1.Text, TextBox3.Text, out da); lblMsg.Text = "Password changed succesfully"; } else { lblMsg.Text = "Invalid Email-Id or Mobile Number"; } }
public dict create(IContext ctx, idstring userid, password password, varchar realname, email email) { dict Return = new dict(); // your code goes here; add return values to 'Return' bool status = false; string message = "unknown error"; long pver; if (userid.str.Length < 5 || !Helpers.IsValidId(userid.str)) { message = "bad user id format: non-special characters, at least length 5 required"; } else if (KeyValueStore.Find("user:"******"the user id " + userid + " already exists"; } else if (KeyValueStore.Find("email:" + email, out pver) != null) { message = "the email address " + email + " is already tied to another user id"; } else { dict user = new dict(); user.Add("userid", userid.str); user.Add("password", password.str); user.Add("realname", realname.str); user.Add("email", email.str); user.Add("activationkey", Helpers.RandomString(24)); if (KeyValueStore.Store("user:"******"user " + userid + " created"; status = true; } else { message = "database error when trying to create user " + userid; } } Return.Add("status", status); Return.Add("message", message); return(Return); } // create
public dict create(IContext ctx, idstring userid, password password, varchar realname, email email) { dict Return = new dict(); // your code goes here; add return values to 'Return' bool status = false; string message = "unknown error"; long pver; if (userid.str.Length < 5 || !Helpers.IsValidId(userid.str)) { message = "bad user id format: non-special characters, at least length 5 required"; } else if (KeyValueStore.Find("user:"******"the user id " + userid + " already exists"; } else if (KeyValueStore.Find("email:" + email, out pver) != null) { message = "the email address " + email + " is already tied to another user id"; } else { dict user = new dict(); user.Add("userid", userid.str); user.Add("password", password.str); user.Add("realname", realname.str); user.Add("email", email.str); user.Add("activationkey", Helpers.RandomString(24)); if (KeyValueStore.Store("user:"******"user " + userid + " created"; status = true; } else { message = "database error when trying to create user " + userid; } } Return.Add("status", status); Return.Add("message", message); return Return; }
public void login(string email, string password) { password pws = new password(); auth.SignInWithEmailAndPasswordAsync(email, password).ContinueWith(task => { if (task.IsCanceled) { Debug.LogError("SignInWithEmailAndPasswordAsync was canceled."); return; } if (task.IsFaulted) { Debug.LogError("SignInWithEmailAndPasswordAsync encountered an error: " + task.Exception); return; } Firebase.Auth.FirebaseUser newUser = task.Result; Debug.LogFormat("User signed in successfully: {0} ({1})", newUser.DisplayName, newUser.UserId); }); }
IsValidPassword(password, options.MinimumLength, options.MinimumUniqueCharacters, options.RequireSpecialCharacter,
_emailSenderOptions = new EmailSenderOptions(host, port, enableSsl, userName, password, useCertificateValidation, fromName);
return(Task.Run(() => Generate(password, salt, sets, keySize, digest, length, iterations), cancellationToken));
ConnectToDatabase(address, port, database, username, password, sslm);
var(password, keyManager) = watchOnly ? RandomWatchOnlyKeyManager() : RandomKeyManager();
=> service = new ColxService(server, user, password, password, requestTimeoutInSeconds);
private void btn_change_pass_Click(object sender, EventArgs e) { password pass = new password(); pass.ShowDialog(); }
=> service = new XimBlockService(server, user, password, password, requestTimeoutInSeconds);
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { password changepass = new password(); changepass.Show(); }