mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-11-22 05:56:25 +00:00
Fix User Update fields filter
This commit is contained in:
parent
014ac7ff7e
commit
4925b52a0e
6
users.go
6
users.go
@ -194,6 +194,10 @@ func (u *Users) Update(user *types.UserDetails) error {
|
|||||||
errs := make(chan types.UpdateError)
|
errs := make(chan types.UpdateError)
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
for k := range m {
|
for k := range m {
|
||||||
|
// Filter updatable fields
|
||||||
|
if ignoredUserField(k) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var value string
|
var value string
|
||||||
// Quota is a special case
|
// Quota is a special case
|
||||||
if k == "Quota" {
|
if k == "Quota" {
|
||||||
@ -206,7 +210,7 @@ func (u *Users) Update(user *types.UserDetails) error {
|
|||||||
} else {
|
} else {
|
||||||
value = m[k].(string)
|
value = m[k].(string)
|
||||||
}
|
}
|
||||||
if !ignoredUserField(k) && value != "" {
|
if value != "" {
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
// All other non ignored values are strings
|
// All other non ignored values are strings
|
||||||
go func(key string, value string) {
|
go func(key string, value string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user