Fix error checking when setting profile image (#9977)

This commit is contained in:
Joram Wilander
2018-12-10 19:44:47 +01:00
committed by Carlos Tadeu Panato Junior
parent 8374b6221e
commit a84eb6505f
+2 -2
View File
@@ -850,8 +850,8 @@ func (a *App) SetProfileImageFromFile(userId string, file io.Reader) *model.AppE
a.InvalidateCacheForUser(userId)
user, err := a.GetUser(userId)
if err != nil {
user, userErr := a.GetUser(userId)
if userErr != nil {
mlog.Error(fmt.Sprintf("Error in getting users profile for id=%v forcing logout", userId), mlog.String("user_id", userId))
return nil
}