[IMP] portal: sanitize email address when using it as a user login
authorRaphael Collet <rco@openerp.com>
Tue, 18 Sep 2012 09:01:18 +0000 (11:01 +0200)
committerRaphael Collet <rco@openerp.com>
Tue, 18 Sep 2012 09:01:18 +0000 (11:01 +0200)
bzr revid: rco@openerp.com-20120918090118-xhmgpq5fgqwjnfxw

addons/portal/wizard/portal_wizard.py

index 696cb78..04e3980 100644 (file)
@@ -170,7 +170,7 @@ class wizard_user(osv.osv_memory):
         res_users = self.pool.get('res.users')
         create_context = dict(context or {}, noshortcut=True)       # to prevent shortcut creation
         values = {
-            'login': wizard_user.email,
+            'login': extract_email(wizard_user.email),
             'password': random_password(),
             'partner_id': wizard_user.partner_id.id,
             'groups_id': [(6, 0, [])],