@@ -104,9 +104,10 @@ func CreateUser(cmd *m.CreateUserCommand) error {
|
||||
LastSeenAt: time.Now().AddDate(-10, 0, 0),
|
||||
}
|
||||
|
||||
user.Salt = util.GetRandomString(10)
|
||||
user.Rands = util.GetRandomString(10)
|
||||
|
||||
if len(cmd.Password) > 0 {
|
||||
user.Salt = util.GetRandomString(10)
|
||||
user.Rands = util.GetRandomString(10)
|
||||
user.Password = util.EncodePassword(cmd.Password, user.Salt)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user