summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/user.py
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2011-02-15 15:11:43 -0500
committerAdam Young <ayoung@redhat.com>2011-02-15 14:42:58 -0500
commitfd0a6b484909ebbba1099733b22eeae58a5da671 (patch)
tree89bb728902ae48c8fbc6afdbb8671b2f3ff56f0e /ipalib/plugins/user.py
parentaab27a76e2d847533aab7632c657aa88fdd86f7a (diff)
downloadfreeipa-fd0a6b484909ebbba1099733b22eeae58a5da671.tar.gz
freeipa-fd0a6b484909ebbba1099733b22eeae58a5da671.tar.xz
freeipa-fd0a6b484909ebbba1099733b22eeae58a5da671.zip
Fix setattr mail bug in user plugin.
The email normalizer expects a list or tuple, but when using setattr it gets a string and interates on it as if it was a list/tuple.
Diffstat (limited to 'ipalib/plugins/user.py')
-rw-r--r--ipalib/plugins/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index da7b92aa5..e74b8bed2 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -221,6 +221,8 @@ class user(LDAPObject):
# check if default email domain should be added
if email and 'ipadefaultemaildomain' in config:
norm_email = []
+ if not isinstance(email, (list, tuple)):
+ email = [email]
for m in email:
if m.find('@') == -1:
norm_email.append(m + u'@' + config['ipadefaultemaildomain'][0])