def handle_anonymous_user(self, response):
try:<EOL><INDENT>ulogin = ULoginUser.objects.get(network=response['<STR_LIT>'],<EOL>uid=response['<STR_LIT>'])<EOL><DEDENT>except ULoginUser.DoesNotExist:<EOL><INDENT>user = create_user(request=self.request,<EOL>ulogin_response=response)<EOL>ulogin = ULoginUser.objects.create(user=user,<EOL>network=response['<STR_LIT>'],<EOL>identity=response['<STR_LIT>'],<EOL>uid=response['<STR_LIT>'])<EOL>registered = True<EOL><DEDENT>else:<EOL><INDENT>user = ulogin.user<EOL>registered = False<EOL><DEDENT>if not hasattr(user, '<STR_LIT>'):<EOL><INDENT>user.backend = settings.AUTHENTICATION_BACKEND<EOL><DEDENT>login(self.request, user)<EOL>return user, ulogin, registered<EOL>
Handles the ULogin response if user is not authenticated (anonymous)