Remove GetOrganizationByName().

This commit is contained in:
Yang Luo
2021-05-16 22:58:30 +08:00
parent e6862713bb
commit 6508d96162
5 changed files with 8 additions and 21 deletions

View File

@ -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

View File

@ -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