-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear maddy author, please tell me about the function of batch creating users. #733
Comments
about code: import (
) const ( // 生成随机的5位数字用户名
} // 生成 bcrypt 哈希密码并添加前缀 // 添加用户到数据库 func main() {
} |
You can do something what I did with the password reset for Maddy specifically: https://github.com/hugmouse/maddy-password-reset/blob/master/main.go#L269 Instead of handling SQL yourself - use CLI that Maddy provides: https://maddy.email/tutorials/setting-up/#user-accounts-and-maddy-command |
Created a minimal config to test it:
bcrypt value is of "12345", generated using https://www.bcryptcalculator.com/encode |
Dear maddy author, please tell me about the function of batch creating users.
I currently have a requirement to have the golang program automatically create users. I tried to directly insert the database credentials.db, but the inserted database user could not log in normally. I would like to ask for guidance on how I should do this so that I can automatically generate users without having to manually go to the terminal to create new users.
I inserted this picture using the program, but I can't log in normally
The text was updated successfully, but these errors were encountered: