fix: get user account

This commit is contained in:
2023-08-09 20:07:49 +02:00
parent 8278b74ae8
commit 0d3a68997a
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ func (p *Prosody) ChangePassword(user string, currentPwd string, newPwd string)
return errors.New("password is incorrect")
}
cmd := exec.Command("/usr/bin/prosodyctl", "passwd", user+"@"+p.plainDomain)
cmd := exec.Command("/usr/bin/prosodyctl", "passwd", acc.User+"@"+p.plainDomain)
// Create a pipe to write to the process's standard input.
stdin, err := cmd.StdinPipe()
if err != nil {