aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/auth/linkaccount.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/auth/linkaccount.go')
-rw-r--r--routers/web/auth/linkaccount.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go
index f41590dc13..1d94e52fe3 100644
--- a/routers/web/auth/linkaccount.go
+++ b/routers/web/auth/linkaccount.go
@@ -55,7 +55,11 @@ func LinkAccount(ctx *context.Context) {
}
gu, _ := gothUser.(goth.User)
- uname := getUserName(&gu)
+ uname, err := getUserName(&gu)
+ if err != nil {
+ ctx.ServerError("UserSignIn", err)
+ return
+ }
email := gu.Email
ctx.Data["user_name"] = uname
ctx.Data["email"] = email