offline avatar offline committed 353cf9e

confirmation removed

Comments (0)

Files changed (1)

openauth/views.py

 from django.contrib import auth 
 
 from annoying.decorators import render_to
-from confirmation.models import Confirmation
 
-from openauth.utils import email_template, str_to_class, get_backend
-from openauth.forms import SocialIDExtraForm
+from openauth.utils import str_to_class, get_backend
 from openauth import settings
 
 
     """                                                
     Handle registration of new user with extra data for profile
     """                                                          
-    backend = get_backend(provider)
-
     try:
         identity = request.session['identity']
     except KeyError:
         raise Http404
 
-
     if request.method == "POST":
         form = str_to_class(settings.SOCIALID_EXTRA_FORM)(request.POST)
         if form.is_valid():
             user = form.save(identity, provider)
             del request.session['identity']
-            if settings.OPENID_ACTIVATION_REQUIRED:
-                confirmation = Confirmation.objects.create(user, settings.ACTIVATION_TYPE)
-                params = {'domain': request.get_host(), 'email': user.email, 'url': confirmation.get_url(request)}
-                email_template(user.email, 'openauth/mail/registration.txt', **params)
-                request.flash['success'] = openauth.lang.PLEASE_ACTIVATE
-                return redirect("/")
             user = auth.authenticate(identity=identity, provider=provider)
             if user:
                 auth.login(request, user)
-                redirect_url = request.session['next_url']
+                next_url = request.session['next_url']
                 del request.session['next_url']
-                return redirect(redirect_url)
+                return redirect(next_url)
     else:
         initial = request.session['extra']
         form = str_to_class(settings.SOCIALID_EXTRA_FORM)(initial=initial)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.