Fix redirect path after sign in.

This commit is contained in:
takezoe
2013-07-11 04:08:06 +09:00
parent 5e8a73e29d
commit 46b3807f21
2 changed files with 6 additions and 5 deletions

View File

@@ -58,9 +58,6 @@ trait AccountControllerBase extends AccountManagementControllerBase with FlashMa
getAccountByUserName(userName).flatMap(_.image).map { image =>
contentType = FileUtil.getMimeType(image)
new java.io.File(getUserUploadDir(userName), image)
// } getOrElse {
// contentType = "image/png"
// Thread.currentThread.getContextClassLoader.getResourceAsStream("noimage.png")
} getOrElse NotFound
}
@@ -86,7 +83,11 @@ trait AccountControllerBase extends AccountManagementControllerBase with FlashMa
get("/register"){
if(loadSystemSettings().allowAccountRegistration){
account.html.edit(None, None)
if(context.loginAccount.isDefined){
redirect("/")
} else {
account.html.edit(None, None)
}
} else NotFound
}