mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-01 10:00:19 +08:00
feat: optimize the "forget password" page (#1709)
This commit is contained in:
@ -95,6 +95,15 @@ func GetOwnerAndNameFromId(id string) (string, string) {
|
||||
return tokens[0], tokens[1]
|
||||
}
|
||||
|
||||
func GetOwnerFromId(id string) string {
|
||||
tokens := strings.Split(id, "/")
|
||||
if len(tokens) != 2 {
|
||||
panic(errors.New("GetOwnerAndNameFromId() error, wrong token count for ID: " + id))
|
||||
}
|
||||
|
||||
return tokens[0]
|
||||
}
|
||||
|
||||
func GetOwnerAndNameFromIdNoCheck(id string) (string, string) {
|
||||
tokens := strings.SplitN(id, "/", 2)
|
||||
return tokens[0], tokens[1]
|
||||
|
Reference in New Issue
Block a user