go-ldap-admin icon indicating copy to clipboard operation
go-ldap-admin copied to clipboard

定时任务SearchUserDiff总是会把用户设置为2

Open ywxkz opened this issue 1 year ago • 1 comments

定时任务SearchUserDiff总是会把用户sync_state状态设置为2,相关代码:err = isql.User.ChangeSyncState(int(user.ID), 2),导致找会密码的时候提示:该用户已离职或者未同步在ldap ...

相关代码: if user.Status != 1 || user.SyncState != 1 { return nil, tools.NewMySqlError(fmt.Errorf("该用户已离职或者未同步在ldap,无法重置密码,如有疑问,请联系管理员")) }

另外在后台删除用户,cn=group里面的uniqueMember不会同步删除,mysql.groups表里面的用户数据也不会同步删除。

还有个小建议:修改密码的时候,新密码长度最好有8位的强制要求

ywxkz avatar Sep 04 '24 07:09 ywxkz

您好 @e-era👋,我已收到您的反馈,我将安排时间考虑您提交的信息并进行回复。-- 这条信息是由自动回复的机器人发出的。

Hello @e-era. I have received your feedback, and I will arrange time to consider the information you submitted and reply. -- This message is sent by an automatic reply robot.

eryajf avatar Sep 04 '24 07:09 eryajf