sql: added code migration type
This commit is contained in:
1 parent
6316d637f1
commit
92ed1f04af
6 files changed
+90
-9
No files matched your search
@@ -113,9 +113,10 @@ func CreateUser(ctx context.Context, 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