Skip to content

Commit

Permalink
user registration didn't work as membership api isn't active; assigni…
Browse files Browse the repository at this point in the history
…ng empty string to opt_in_uuid wasn't a good idea because of unique value field restriction
  • Loading branch information
thomiel committed May 18, 2019
1 parent de1bcbb commit c82190f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions collecting_society_portal_repertoire/includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,13 @@ def frontend(self):
api_key=settings['api.c3smembership.api_key'])
# top menue
reg['menues']['top'] = []
if reg['services']['c3smembership'].is_connected():
reg['menues']['top'] += [
{
'name': _(u'register'),
'page': 'register'}
]
# TODO: fix membership api and uncomment the line below
#if reg['services']['c3smembership'].is_connected():
reg['menues']['top'] += [
{
'name': _(u'register'),
'page': 'register'}
]
reg['menues']['top'] += [
{
'name': _(u'survey'),
Expand Down
3 changes: 2 additions & 1 deletion collecting_society_portal_repertoire/views/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Repository: https://github.com/C3S/collecting_society.portal.repertoire

import logging
import uuid

from pyramid.security import (
remember,
Expand Down Expand Up @@ -71,7 +72,7 @@ def verify_email_helper(the_class):
if web_user.new_email:
web_user.email = web_user.new_email
web_user.new_email = ''
web_user.opt_in_uuid = ''
web_user.opt_in_uuid = unicode(uuid.uuid4()) # invalidate uuid
web_user.save()
the_class.request.session.flash(
_(u"Your email verification was successful."),
Expand Down

0 comments on commit c82190f

Please sign in to comment.