aboutsummaryrefslogtreecommitdiff
path: root/models/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/models/user.go b/models/user.go
index 3b28f5ed..ed64c397 100644
--- a/models/user.go
+++ b/models/user.go
@@ -257,7 +257,7 @@ func (u *User) GetOrganizations() error {
u.Orgs = make([]*User, len(ous))
for i, ou := range ous {
- u.Orgs[i], err = GetUserById(ou.OrgID)
+ u.Orgs[i], err = GetUserByID(ou.OrgID)
if err != nil {
return err
}
@@ -586,7 +586,7 @@ func GetUserByKeyId(keyId int64) (*User, error) {
return user, nil
}
-func getUserById(e Engine, id int64) (*User, error) {
+func getUserByID(e Engine, id int64) (*User, error) {
u := new(User)
has, err := e.Id(id).Get(u)
if err != nil {
@@ -597,9 +597,9 @@ func getUserById(e Engine, id int64) (*User, error) {
return u, nil
}
-// GetUserById returns the user object by given ID if exists.
-func GetUserById(id int64) (*User, error) {
- return getUserById(x, id)
+// GetUserByID returns the user object by given ID if exists.
+func GetUserByID(id int64) (*User, error) {
+ return getUserByID(x, id)
}
// GetUserByName returns user by given name.
@@ -651,7 +651,7 @@ func GetEmailAddresses(uid int64) ([]*EmailAddress, error) {
return nil, err
}
- u, err := GetUserById(uid)
+ u, err := GetUserByID(uid)
if err != nil {
return nil, err
}
@@ -697,7 +697,7 @@ func (email *EmailAddress) Activate() error {
return err
}
- if user, err := GetUserById(email.Uid); err != nil {
+ if user, err := GetUserByID(email.Uid); err != nil {
return err
} else {
user.Rands = GetUserSalt()
@@ -824,7 +824,7 @@ func GetUserByEmail(email string) (*User, error) {
return nil, err
}
if has {
- return GetUserById(emailAddress.Uid)
+ return GetUserByID(emailAddress.Uid)
}
return nil, ErrUserNotExist{0, "email"}