mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-08-30 06:16:06 +02:00
Remove unused commit (#14741)
* Remove unused commit * a small nit Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
835f301063
commit
f3e64f677f
1 changed files with 3 additions and 5 deletions
|
@ -106,10 +106,8 @@ func recalculateUserEmptyPWD(x *xorm.Engine) (err error) {
|
|||
}
|
||||
|
||||
// delete salt and algo where password is empty
|
||||
if _, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))).
|
||||
Cols("salt", "passwd_hash_algo").Update(&User{}); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))).
|
||||
Cols("salt", "passwd_hash_algo").Update(&User{})
|
||||
|
||||
return sess.Commit()
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue