Commits

offline committed 24bd328 Merge

merge

Comments (0)

Files changed (3)

openauth/settings.py

 
 OPENID_REQUIRE_EMAIL = get_config("OPENID_REQUIRE_EMAIL", True)
 OPENID_REQUIRE_USERNAME = get_config("OPENID_REQUIRE_USERNAME", True)
+OPENID_URL_USED = get_config("OPENID_URL_USED", True)
 
 SREG_FIELDS = ['nickname', 'email', 'fullname', 'dob', 'gender',
                 'postcode', 'country', 'language', 'timezone']

openauth/utils.py

 
 import openauth
 
-
-
 def unicode_urlencode(params):
     """A unicode aware version of urllib.urlencode"""
     from urllib import urlencode

openauth/views.py

 from openauth.forms import ResetPasswordForm, NewPasswordForm, LoginForm, \
      OpenIDLoginForm, OpenIDRegistrationForm
 from openauth.utils import email_template, build_redirect_url, str_to_class, \
-    generate_hash, activation_required, message
+    generate_hash, activation_required
 from openauth.models import OpenID
 
 
 
-
-
 @render_to('openauth/registration.html')
 def registration(request):
     """
             except OpenID.DoesNotExist:
                 pass
             else:
-                return message(u'This url already used by %s' % user.username)
+                return notify_user.error(request, "openauth-login", openauth.lang.OPENID_URL_USED)
             OpenID(user=request.user, url=resp.identity_url).save()
             return redirect(registration_redirect)
         else: