(refs #28)Look up Gravatar if user icon is not configured.

This commit is contained in:
takezoe
2013-07-11 03:51:50 +09:00
parent 072290e544
commit 796a276b65
17 changed files with 53 additions and 27 deletions

View File

@@ -58,10 +58,10 @@ 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 {
// contentType = "image/png"
// Thread.currentThread.getContextClassLoader.getResourceAsStream("noimage.png")
} getOrElse NotFound
}
get("/:userName/_edit")(oneselfOnly {