mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-28 02:36:08 +08:00
Fix error checking when setting profile image (#9977)
This commit is contained in:
committed by
Carlos Tadeu Panato Junior
parent
8374b6221e
commit
a84eb6505f
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user