Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Changed some code in backends.py and add condition in models.py.

  • Loading branch information...
commit fded7178142b31829debe09832aa5581030a9965 1 parent 06c9f75
Miha Novak authored
2  piplmesh/account/backends.py
@@ -127,7 +127,7 @@ def authenticate(self, foursquare_token, request):
127 127 access_token = response.get('access_token')
128 128
129 129 # Retrieve user's public profile information
130   - data = urllib.urlopen('https://api.foursquare.com/v2/users/self?oauth_token=%s' % access_token)
  130 + data = urllib.urlopen('https://api.foursquare.com/v2/users/self?%s' % urllib.urlencode({'oauth_token': access_token}))
131 131 foursquare_data = json.load(data)
132 132 foursquare_user = foursquare_data['response']['user']
133 133 """
2  piplmesh/account/models.py
@@ -69,7 +69,7 @@ def is_anonymous(self):
69 69 return not self.is_authenticated()
70 70
71 71 def is_authenticated(self):
72   - return self.is_active and (self.has_usable_password() or self.facebook_id is not None or self.twitter_id is not None)
  72 + return self.is_active and (self.has_usable_password() or self.facebook_id is not None or self.foursquare_id is not None or self.twitter_id is not None)
73 73
74 74 def check_password(self, raw_password):
75 75 def setter(raw_password):

0 comments on commit fded717

Please sign in to comment.
Something went wrong with that request. Please try again.