MCPcopy Index your code
hub / github.com/filebrowser/filebrowser / Update

Method Update

users/storage.go:85–100  ·  view source on GitHub ↗

Update updates a user in the database.

(user *User, fields ...string)

Source from the content-addressed store, hash-verified

83
84// Update updates a user in the database.
85func (s *Storage) Update(user *User, fields ...string) error {
86 err := user.Clean("", false, fields...)
87 if err != nil {
88 return err
89 }
90
91 err = s.back.Update(user, fields...)
92 if err != nil {
93 return err
94 }
95
96 s.mux.Lock()
97 s.updated[user.ID] = time.Now().Unix()
98 s.mux.Unlock()
99 return nil
100}
101
102// Save saves the user in a storage.
103func (s *Storage) Save(user *User) error {

Callers

nothing calls this directly

Calls 2

UpdateMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected