diff options
| author | Olivier Dony <odo@openerp.com> | 2014-01-15 10:31:20 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-01-15 10:31:20 +0100 |
| commit | b7fe8e1f8a1bae78df8b00c682cba788fd818bdb (patch) | |
| tree | 1608647ae0267268c836998d3d2f2217e4dc7305 /addons/portal/wizard | |
| parent | 3a95bbaf63f0555ad00f0765525417942e2a047e (diff) | |
[FIX] portal: use email_split method to avoid blocking valid emails, rather than obsolete email_re
lp bug: https://launchpad.net/bugs/1199386 fixed
bzr revid: odo@openerp.com-20140115093120-r2u2bmms9y847b93
Diffstat (limited to 'addons/portal/wizard')
| -rw-r--r-- | addons/portal/wizard/portal_wizard.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index 61b23f4f07b..fb46533b559 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -24,7 +24,7 @@ import random from openerp.osv import fields, osv from openerp.tools.translate import _ -from openerp.tools import email_re +from openerp.tools import email_split from openerp import SUPERUSER_ID _logger = logging.getLogger(__name__) @@ -53,8 +53,8 @@ http://www.openerp.com def extract_email(email): """ extract the email address from a user-friendly email address """ - m = email_re.search(email or "") - return m and m.group(0) or "" + addresses = email_split(email) + return addresses[0] if addresses else '' |
