Commit f4b654dc authored by Gero Müller's avatar Gero Müller
Browse files

fix register

parent 1f5b8481
......@@ -48,8 +48,9 @@ class AjaxController(AbstractController):
session = cherrypy.request.db
user_group = vispa.config("usermanagement", "user_group", "user")
user_group = Group.get_by_name(session, user_group)
user_group.add_user(session, user, Group_User_Assoc.CONFIRMED)
if user_group:
user_group = Group.get_or_create_by_name(session, user_group)
user_group.add_user(session, user, Group_User_Assoc.CONFIRMED)
if vispa.config("web", "registration.autoactive", True):
return { "hash": user.hash }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment