from forum.utils.mail import send_email
from forum.authentication.base import InvalidAuthentication
-from forum.authentication import AUTH_PROVIDERS, user_logged_in
+from forum.authentication import AUTH_PROVIDERS
from forum.models import AuthKeyUserAssociation, ValidationHash, Question, Answer
+from forum.actions import UserJoinsAction
def signin_page(request, action=None):
if action is None:
user_.is_superuser = True
user_.save()
+ UserJoinsAction(user=user_, ip=request.META['REMOTE_ADDR']).save()
if not user_.email_isvalid:
send_validation_email(user_)
request.session['auth_error'] = _("Oops, something went wrong in the middle of this process. Please try again.")
return HttpResponseRedirect(request.session.get('on_signin_url', reverse('auth_signin')))
- uassoc = AuthKeyUserAssociation(user=user_, key=request.session['assoc_key'], provider=request.session['auth_provider'])
+ uassoc = AuthKeyUserAssociation(user=user_, key=assoc_key, provider=auth_provider)
uassoc.save()
if email_feeds_form.cleaned_data['subscribe'] == 'n':
user.backend = "django.contrib.auth.backends.ModelBackend"
login(request, user)
- user_logged_in.send(user=user,old_session=old_session,sender=None)
+ #user_logged_in.send(user=user,old_session=old_session,sender=None)
if not forward:
signin_action = request.session.get('on_signin_action', None)