private void resetClientPassword(string id)
        {
            var tmp = _crepo.getByUsername(id);
            var pwd = _tools.passwordGen(10);

            tmp.Password = _tools.passwordHash(pwd);
            var email = new ComMails();

            email.Email = new List <string>();
            email.Email.Add(tmp.Email);
            email.Message  = "Please find below, your credentials to NRP Portal:<br/>Sign in as Client<br/>";
            email.Message += "Username " + tmp.Username + "<br/>Password: " + pwd;
            _comMail.SendMailToPar(email);
            _crepo.update(tmp.ClientContactInfoId, tmp);
        }
예제 #2
0
 //[Authorize(Roles = "ClientContact:15, ClientContact:16, ClientContact:10, ClientContact:11")]
 public IActionResult Update(int id, [FromBody] ClientContactInfo clientContact)
 {
     return(_clientContact.update(id, clientContact) ? new NoContentResult() : StatusCode(500));
 }