Improve "must-change-password" logic and document (#30472) (#30478)

Backport #30472 by wxiaoguang

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
Giteabot
2024-04-14 17:49:16 +00:00
committed by GitHub
co-authored by wxiaoguang KN4CK3R
parent e64926c519
commit b266c78cff
4 changed files with 31 additions and 30 deletions
+2 -2
View File
@@ -284,8 +284,8 @@ func MaxBatchInsertSize(bean any) int {
}
// IsTableNotEmpty returns true if table has at least one record
func IsTableNotEmpty(tableName string) (bool, error) {
return x.Table(tableName).Exist()
func IsTableNotEmpty(beanOrTableName any) (bool, error) {
return x.Table(beanOrTableName).Exist()
}
// DeleteAllRecords will delete all the records of this table