mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Remove GetOrganizationByName().
This commit is contained in:
@ -152,7 +152,7 @@ func (c *ApiController) GetAccount() {
|
||||
|
||||
username := c.GetSessionUser()
|
||||
user := object.GetUser(username)
|
||||
organization := object.GetOrganization(util.GetId(user.Owner))
|
||||
organization := object.GetOrganizationByUser(user)
|
||||
resp = Response{Status: "ok", Msg: "", Data: user, Data2: organization}
|
||||
|
||||
c.Data["json"] = resp
|
||||
|
@ -58,7 +58,7 @@ func (c *ApiController) SendVerificationCode() {
|
||||
c.ResponseError("Invalid phone number")
|
||||
return
|
||||
}
|
||||
org := object.GetOrganizationByName(user.Owner)
|
||||
org := object.GetOrganizationByUser(user)
|
||||
phonePrefix := "86"
|
||||
if org != nil && org.PhonePrefix != "" {
|
||||
phonePrefix = org.PhonePrefix
|
||||
@ -98,7 +98,7 @@ func (c *ApiController) ResetEmailOrPhone() {
|
||||
|
||||
checkDest := dest
|
||||
if destType == "phone" {
|
||||
org := object.GetOrganizationByName(user.Owner)
|
||||
org := object.GetOrganizationByUser(user)
|
||||
phonePrefix := "86"
|
||||
if org != nil && org.PhonePrefix != "" {
|
||||
phonePrefix = org.PhonePrefix
|
||||
|
Reference in New Issue
Block a user