mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Set org and per user locale
This commit is contained in:
parent
23abcf1585
commit
4494ace0a2
30 changed files with 125 additions and 41 deletions
|
@ -136,6 +136,7 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
|
|||
if addUser {
|
||||
userID = uniqueid.Generate()
|
||||
userModel.RefID = userID
|
||||
userModel.Locale = ctx.OrgLocale
|
||||
|
||||
err = h.Store.User.Add(ctx, userModel)
|
||||
if err != nil {
|
||||
|
@ -781,6 +782,7 @@ func (h *Handler) BulkImport(w http.ResponseWriter, r *http.Request) {
|
|||
userModel.Firstname = strings.TrimSpace(v[0])
|
||||
userModel.Lastname = strings.TrimSpace(v[1])
|
||||
userModel.Email = strings.ToLower(strings.TrimSpace(v[2]))
|
||||
userModel.Locale = ctx.OrgLocale
|
||||
|
||||
if len(userModel.Email) == 0 || len(userModel.Firstname) == 0 || len(userModel.Lastname) == 0 {
|
||||
h.Runtime.Log.Info(method + " missing firstname, lastname, or email")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue