more
This commit is contained in:
parent
985db3a060
commit
fcb5182313
2
auth.go
2
auth.go
|
@ -44,7 +44,7 @@ func Login(username, password string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserData) SetPassword(newcrypt []byte) bool {
|
func (u *UserData) SetPassword(newcrypt []byte) bool {
|
||||||
q := fmt.Sprintf("update %s_users set password=? where id=?", c.TablePrefix)
|
q := fmt.Sprintf("update %s_users set password=? where id=? limit 1", c.TablePrefix)
|
||||||
_, err := c.db.Exec(q, newcrypt, u.UserID)
|
_, err := c.db.Exec(q, newcrypt, u.UserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("scsusers.SetPassword: update failed for %s: %s\n", u.Username, err.Error())
|
log.Printf("scsusers.SetPassword: update failed for %s: %s\n", u.Username, err.Error())
|
||||||
|
|
Loading…
Reference in New Issue