Permalink
Browse files

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

  • Loading branch information...
1 parent 06c9f75 commit fded7178142b31829debe09832aa5581030a9965 @mihanovak committed Jun 1, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 piplmesh/account/backends.py
  2. +1 −1 piplmesh/account/models.py
@@ -127,7 +127,7 @@ def authenticate(self, foursquare_token, request):
access_token = response.get('access_token')
# Retrieve user's public profile information
- data = urllib.urlopen('https://api.foursquare.com/v2/users/self?oauth_token=%s' % access_token)
+ data = urllib.urlopen('https://api.foursquare.com/v2/users/self?%s' % urllib.urlencode({'oauth_token': access_token}))
foursquare_data = json.load(data)
foursquare_user = foursquare_data['response']['user']
"""
@@ -69,7 +69,7 @@ def is_anonymous(self):
return not self.is_authenticated()
def is_authenticated(self):
- return self.is_active and (self.has_usable_password() or self.facebook_id is not None or self.twitter_id is not None)
+ 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)
def check_password(self, raw_password):
def setter(raw_password):

0 comments on commit fded717

Please sign in to comment.