- send_template_email([request.user], "auth/mail_validation.html", {'validation_code': hash})
- request.user.message_set.create(message=_("A message with an email validation link was just sent to your address."))
+ # We don't care if there are previous cashes in the database... In every case we have to create a new one
+ hash = ValidationHash.objects.create_new(request.user, 'email', [request.user.email])
+
+ additional_get_params = urllib.urlencode(dict([k, v.encode('utf-8')] for k, v in request.GET.items()))
+ send_template_email([request.user], "auth/mail_validation.html", {
+ 'validation_code': hash,
+ 'additional_get_params' : additional_get_params
+ })
+
+ messages.info(request, _("A message with an email validation link was just sent to your address."))