Advertisement
Guest User

Untitled

a guest
Jun 19th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. def _on_auth(self, user):
  2.         if not user:
  3.             self.abort(403)
  4.             return
  5.        
  6.         auth_id = 'google|%s' % user['email']
  7.        
  8.         store = MultiAuthStore(self)
  9.        
  10.         store.login_with_auth_id(auth_id, remember=True)
  11.        
  12.         # check if this user is registered
  13.         # with us or not, if not then we will create
  14.         # an entry for him
  15.        
  16.         if store.user is None:
  17.         user = self.auth.create_user(username=user['email'],auth_id=auth_id)
  18.  
  19.         return self._on_auth_redirect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement