]> source.dussan.org Git - gitea.git/commitdiff
Merge branch 'dev' of github.com:gogits/gogs into dev
authorUnknown <joe2010xtmf@163.com>
Wed, 9 Apr 2014 18:15:09 +0000 (14:15 -0400)
committerUnknown <joe2010xtmf@163.com>
Wed, 9 Apr 2014 18:15:09 +0000 (14:15 -0400)
Conflicts:
models/oauth2.go

1  2 
gogs.go
models/oauth2.go

diff --cc gogs.go
index 4616141e3d11d2f040d4d1c80eb94daf6be7f6a8,4616141e3d11d2f040d4d1c80eb94daf6be7f6a8..45be7e8712ba0ac7c43bbda8352955dbdaf413d4
+++ b/gogs.go
@@@ -19,7 -19,7 +19,7 @@@ import 
  // Test that go1.2 tag above is included in builds. main.go refers to this definition.
  const go12tag = true
  
--const APP_VER = "0.2.2.0408 Alpha"
++const APP_VER = "0.2.2.0409 Alpha"
  
  func init() {
        base.AppVer = APP_VER
index cde57b87b99f15520c3307e1f538a3d896126108,9a38334e6411696707b173024508f0bc5b4d0320..45728b0d51e252ad4262b5997aba34c615c9b058
@@@ -35,14 -31,18 +35,15 @@@ func AddOauth2(oa *Oauth2) (err error) 
  }
  
  func GetOauth2(identity string) (oa *Oauth2, err error) {
 -      oa = &Oauth2{}
 -      oa.Identity = identity
 -      exists, err := orm.Get(oa)
 +      oa = &Oauth2{Identity: identity}
 +      isExist, err := orm.Get(oa)
        if err != nil {
                return
 -      }
 -      if !exists {
 +      } else if !isExist {
                return nil, ErrOauth2RecordNotExists
 -      }
 -      if oa.Uid == 0 {
 +      } else if oa.Uid == 0 {
                return oa, ErrOauth2NotAssociatedWithUser
        }
-       return GetUserById(oa.Uid)
+       oa.User, err = GetUserById(oa.Uid)
 -      return
++      return oa, err
  }