diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-23 09:40:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 09:40:35 -0700 |
commit | 78a9774147c91407be3fb925b52336174854e632 (patch) | |
tree | 13ed08851c2bb6510310878e18384ea1dd85a2f0 /model/user.go | |
parent | 08b7b1c4144f18a9dbf52bfe0eb9182f2b4eba4a (diff) | |
download | chat-78a9774147c91407be3fb925b52336174854e632.tar.gz chat-78a9774147c91407be3fb925b52336174854e632.tar.bz2 chat-78a9774147c91407be3fb925b52336174854e632.zip |
add model.NewX funcs for builtin types (#7692)
* add model.NewX funcs for builtin types
* whoops, forgot to add the new file
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 6 |
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 |