mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 03:55:58 +01:00
Returns a gray image if username has not been registered.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 473 B |
@@ -58,7 +58,10 @@ trait AccountControllerBase extends AccountManagementControllerBase with FlashMa
|
|||||||
getAccountByUserName(userName).flatMap(_.image).map { image =>
|
getAccountByUserName(userName).flatMap(_.image).map { image =>
|
||||||
contentType = FileUtil.getMimeType(image)
|
contentType = FileUtil.getMimeType(image)
|
||||||
new java.io.File(getUserUploadDir(userName), image)
|
new java.io.File(getUserUploadDir(userName), image)
|
||||||
} getOrElse NotFound
|
} getOrElse {
|
||||||
|
contentType = "image/png"
|
||||||
|
Thread.currentThread.getContextClassLoader.getResourceAsStream("noimage.png")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get("/:userName/_edit")(oneselfOnly {
|
get("/:userName/_edit")(oneselfOnly {
|
||||||
|
|||||||
Reference in New Issue
Block a user