aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth/lib.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/auth/lib.py')
-rw-r--r--mediagoblin/auth/lib.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/mediagoblin/auth/lib.py b/mediagoblin/auth/lib.py
index bfc36b28..47f9097f 100644
--- a/mediagoblin/auth/lib.py
+++ b/mediagoblin/auth/lib.py
@@ -18,10 +18,6 @@ import random
import bcrypt
-from mediagoblin.tools.mail import send_email
-from mediagoblin.tools.template import render_template
-from mediagoblin import mg_globals
-
def bcrypt_check_password(raw_pass, stored_hash, extra_salt=None):
"""
@@ -88,33 +84,3 @@ def fake_login_attempt():
randplus_hashed_pass = bcrypt.hashpw(hashed_pass, rand_salt)
randplus_stored_hash == randplus_hashed_pass
-
-
-EMAIL_FP_VERIFICATION_TEMPLATE = (
- u"http://{host}{uri}?"
- u"userid={userid}&token={fp_verification_key}")
-
-
-def send_fp_verification_email(user, request):
- """
- Send the verification email to users to change their password.
-
- Args:
- - user: a user object
- - request: the request
- """
- rendered_email = render_template(
- request, 'mediagoblin/auth/fp_verification_email.txt',
- {'username': user.username,
- 'verification_url': EMAIL_FP_VERIFICATION_TEMPLATE.format(
- host=request.host,
- uri=request.urlgen('mediagoblin.auth.verify_forgot_password'),
- userid=unicode(user.id),
- fp_verification_key=user.fp_verification_key)})
-
- # TODO: There is no error handling in place
- send_email(
- mg_globals.app_config['email_sender_address'],
- [user.email],
- 'GNU MediaGoblin - Change forgotten password!',
- rendered_email)