Mercurial > kallithea
diff rhodecode/controllers/api/api.py @ 1649:57a0e240288f beta
API create user use UserModel new method
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 02 Nov 2011 23:26:49 +0200 |
parents | 2c0d35e336b5 |
children | 7d1fc253549e |
line wrap: on
line diff
--- a/rhodecode/controllers/api/api.py Wed Nov 02 22:43:55 2011 +0200 +++ b/rhodecode/controllers/api/api.py Wed Nov 02 23:26:49 2011 +0200 @@ -116,15 +116,8 @@ raise JSONRPCError("user %s already exist" % username) try: - form_data = dict(username=username, - password=password, - active=active, - admin=admin, - name=firstname, - lastname=lastname, - email=email, - ldap_dn=ldap_dn) - UserModel().create_ldap(username, password, ldap_dn, form_data) + UserModel().create_or_update(username, password, email, firstname, + lastname, active, admin, ldap_dn) return dict(msg='created new user %s' % username) except Exception: log.error(traceback.format_exc())