commit/galaxy-central: martenson: bugfix: registration process ignoring the activation configuration and always sending email
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b3a6908168ee/ Changeset: b3a6908168ee User: martenson Date: 2013-09-24 22:11:39 Summary: bugfix: registration process ignoring the activation configuration and always sending email Affected #: 1 file diff -r d0bbd2a2b4a2c5eb7b0eb8684a1cd030fd01f269 -r b3a6908168eed3e5846728cabcecb9a9c02c05c6 lib/galaxy/webapps/galaxy/controllers/user.py --- a/lib/galaxy/webapps/galaxy/controllers/user.py +++ b/lib/galaxy/webapps/galaxy/controllers/user.py @@ -722,15 +722,19 @@ status = 'error' success = False else: - is_activation_sent = self.send_verification_email( trans, email ) - if is_activation_sent: - message = 'Now logged in as %s.<br>Verification email has been sent to your email address. Please verify it by clicking the activation link in the email.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) ) + if trans.app.config.user_activation_on: + is_activation_sent = self.send_verification_email( trans, email ) + if is_activation_sent: + message = 'Now logged in as %s.<br>Verification email has been sent to your email address. Please verify it by clicking the activation link in the email.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) ) + success = True + else: + message = 'Unable to send activation email, please contact your local Galaxy administrator.' + if trans.app.config.admin_email is not None: + message += 'Contact: %s' % trans.app.config.admin_email + success = False + else: # User activation is OFF, proceed without sending the activation email. + message = 'Now logged in as %s.<br><a target="_top" href="%s">Return to the home page.</a>' % ( user.email, url_for( '/' ) ) success = True - else: - message = 'Unable to send activation email, please contact your local Galaxy administrator.' - if trans.app.config.admin_email is not None: - message += 'Contact: %s' % trans.app.config.admin_email - success = False return ( message, status, user, success ) def send_verification_email( self, trans, email ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org