summaryrefslogtreecommitdiffstats
path: root/model/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/user.go')
-rw-r--r--model/user.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/model/user.go b/model/user.go
index 8a2c5930c..8b1ada265 100644
--- a/model/user.go
+++ b/model/user.go
@@ -320,8 +320,7 @@ func (u *User) Etag(showFullName, showEmail bool) string {
// Remove any private data from the user object
func (u *User) Sanitize(options map[string]bool) {
u.Password = ""
- u.AuthData = new(string)
- *u.AuthData = ""
+ u.AuthData = NewString("")
u.MfaSecret = ""
if len(options) != 0 && !options["email"] {
@@ -341,8 +340,7 @@ func (u *User) Sanitize(options map[string]bool) {
func (u *User) ClearNonProfileFields() {
u.Password = ""
- u.AuthData = new(string)
- *u.AuthData = ""
+ u.AuthData = NewString("")
u.MfaSecret = ""
u.EmailVerified = false
u.AllowMarketing = false