add some more logs

This commit is contained in:
Urko 2023-08-04 23:08:17 +02:00
parent c1809ac130
commit 3c9d40544c
2 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,8 @@ func (p *Prosody) loadAccount(username string) (*account, error) {
username = strings.Replace(username, p.plainDomain, "", -1)
}
log.Println("username", username)
data, err := os.ReadFile(p.accountsPath + username + ".dat")
if err != nil {
return nil, err

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)
cmd := exec.Command("/usr/bin/prosodyctl", "passwd", user+"@"+p.plainDomain)
// Create a pipe to write to the process's standard input.
stdin, err := cmd.StdinPipe()
if err != nil {