From 69a855f3d4b9060bfdc0256aecf29632106c48f5 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Sat, 11 Aug 2018 20:33:19 +0100 Subject: [PATCH] log user in after a successful sign up (#4615) --- options/locale/locale_en-US.ini | 1 + routers/user/auth.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 145dfe803..d39f601a4 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -204,6 +204,7 @@ remember_me = Remember Me forgot_password_title= Forgot Password forgot_password = Forgot password? sign_up_now = Need an account? Register now. +sign_up_successful = Account was successfully created. confirmation_mail_sent_prompt = A new confirmation email has been sent to %s. Please check your inbox within the next %s to complete the registration process. reset_password_mail_sent_prompt = A confirmation email has been sent to %s. Please check your inbox within the next %s to complete the password reset process. active_your_account = Activate Your Account diff --git a/routers/user/auth.go b/routers/user/auth.go index e99f9d5de..0e9e29e1c 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -987,7 +987,8 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo return } - ctx.Redirect(setting.AppSubURL + "/user/login") + ctx.Flash.Success(ctx.Tr("auth.sign_up_successful")) + handleSignInFull(ctx, u, false, true) } // Activate render activate user page