X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c8ed8f4296e9022264c5e207434d1af810511ff4..95757b7ab8ad52783347c645dd3bdb37d09740e2:/forum_modules/facebookauth/authentication.py?ds=sidebyside diff --git a/forum_modules/facebookauth/authentication.py b/forum_modules/facebookauth/authentication.py index cc34fb5..4e9a44a 100644 --- a/forum_modules/facebookauth/authentication.py +++ b/forum_modules/facebookauth/authentication.py @@ -64,10 +64,16 @@ class FacebookAuthConsumer(AuthenticationConsumer): else: username = '' + # Check whether the length if the email is greater than 75, if it is -- just replace the email + # with a blank string variable, otherwise we're going to have trouble with the Django model. + email = smart_unicode(json['email']) + if len(email) > 75: + email = '' + # Return the user data. return { 'username': username, - 'email': smart_unicode(json['email']), + 'email': email, } class FacebookAuthContext(ConsumerTemplateContext): @@ -76,6 +82,6 @@ class FacebookAuthContext(ConsumerTemplateContext): weight = 100 human_name = 'Facebook' code_template = 'modules/facebookauth/button.html' - extra_css = ["http://www.facebook.com/css/connect/connect_button.css"] + extra_css = [] API_KEY = settings.FB_API_KEY \ No newline at end of file