Skip to content

Commit 52a7b64

Browse files
author
Christian Roessner
committed
Fix: Remove redundant AccountField check in auth logic
The check for `AccountField` being nil was unnecessary as the code handles the assignment condition elsewhere. This simplifies the `auth.go` file and ensures the logic is more streamlined and maintains correctness. Signed-off-by: Christian Roessner <[email protected]>
1 parent 427d1db commit 52a7b64

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

server/core/auth.go

-4
Original file line numberDiff line numberDiff line change
@@ -1582,10 +1582,6 @@ func (a *AuthState) postVerificationProcesses(ctx *gin.Context, useCache bool, b
15821582
*/
15831583

15841584
if a.UserFound {
1585-
if passDBResult.AccountField != nil {
1586-
a.AccountField = passDBResult.AccountField
1587-
}
1588-
15891585
accountName, err = a.updateUserAccountInRedis()
15901586
if err != nil {
15911587
level.Error(log.Logger).Log(global.LogKeyGUID, a.GUID, global.LogKeyMsg, err.Error())

0 commit comments

Comments
 (0)