diff --git a/kallithea/model/user.py b/kallithea/model/user.py --- a/kallithea/model/user.py +++ b/kallithea/model/user.py @@ -37,7 +37,7 @@ from tg.i18n import ugettext as _ from sqlalchemy.exc import DatabaseError -from kallithea.lib.utils2 import safe_str, generate_api_key, get_current_authuser +from kallithea.lib.utils2 import safe_unicode, generate_api_key, get_current_authuser from kallithea.lib.caching_query import FromCache from kallithea.model.db import Permission, User, UserToPerm, \ UserEmailMap, UserIpMap @@ -145,9 +145,9 @@ class UserModel(object): new_user.admin = admin new_user.email = email new_user.active = active - new_user.extern_name = safe_str(extern_name) \ + new_user.extern_name = safe_unicode(extern_name) \ if extern_name else None - new_user.extern_type = safe_str(extern_type) \ + new_user.extern_type = safe_unicode(extern_type) \ if extern_type else None new_user.name = firstname new_user.lastname = lastname