Skip to content

Commit

Permalink
Fix import of mailer in user module
Browse files Browse the repository at this point in the history
  • Loading branch information
icmurray committed Nov 2, 2012
1 parent e30ae32 commit 6339e83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ckan/controllers/user.py
Expand Up @@ -6,7 +6,7 @@

import ckan.misc
from ckan.lib.base import *
from ckan.lib import mailer
import ckan.lib
from ckan.authz import Authorizer
from ckan.lib.navl.dictization_functions import DataError, unflatten
from ckan.logic import NotFound, NotAuthorized, ValidationError
Expand Down Expand Up @@ -347,10 +347,10 @@ def request_reset(self):

if user_obj:
try:
mailer.send_reset_link(user_obj)
ckan.lib.mailer.send_reset_link(user_obj)
h.flash_success(_('Please check your inbox for a reset code.'))
h.redirect_to('/')
except mailer.MailerException, e:
except ckan.lib.mailer.MailerException, e:
h.flash_error(_('Could not send reset link: %s') % unicode(e))
return render('user/request_reset.html')

Expand All @@ -373,7 +373,7 @@ def perform_reset(self, id):
abort(404, _('User not found'))

c.reset_key = request.params.get('key')
if not mailer.verify_reset_link(user_obj, c.reset_key):
if not ckan.lib.mailer.verify_reset_link(user_obj, c.reset_key):
h.flash_error(_('Invalid reset key. Please try again.'))
abort(403)

Expand Down

0 comments on commit 6339e83

Please sign in to comment.