mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 05:55:51 +01:00
(refs #335)Oops, fix substring condition
This commit is contained in:
@@ -61,7 +61,7 @@ object LDAPUtil {
|
||||
|
||||
private def getUserNameFromMailAddress(userName: String): String = {
|
||||
(userName.indexOf('@') match {
|
||||
case i if i < 0 => userName.substring(0, i)
|
||||
case i if i >= 0 => userName.substring(0, i)
|
||||
case i => userName
|
||||
}).replaceAll("[^a-zA-Z0-9\\-_.]", "").replaceAll("^[_\\-]", "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user