mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
(refs #28)Look up Gravatar if user icon is not configured.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user