Commit e3f117a8 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_web_ung_theme: migrate to ERP5 Login authentication.

parent f68df8ce
...@@ -11,14 +11,17 @@ person = portal.person_module.newContent(portal_type="Person") ...@@ -11,14 +11,17 @@ person = portal.person_module.newContent(portal_type="Person")
person.edit(first_name=form.get("firstname"), person.edit(first_name=form.get("firstname"),
last_name=form.get("lastname"), last_name=form.get("lastname"),
email_text=form.get("email"), email_text=form.get("email"),
password=form.get("password"), reference=login, # BBB
reference=login,
) )
assignment = person.newContent(portal_type='Assignment') assignment = person.newContent(portal_type='Assignment')
assignment.setFunction("ung_user") assignment.setFunction("ung_user")
assignment.open() assignment.open()
login = person.newContent(portal_type='ERP5 Login',
password=form.get("password"),
reference=login)
login.validate()
person.validate() person.validate()
return json.dumps(True) return json.dumps(True)
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