##// END OF EJS Templates
API create user use UserModel new method
marcink -
r1649:57a0e240 beta
parent child Browse files
Show More
@@ -116,15 +116,8 b' class ApiController(JSONRPCController):'
116 raise JSONRPCError("user %s already exist" % username)
116 raise JSONRPCError("user %s already exist" % username)
117
117
118 try:
118 try:
119 form_data = dict(username=username,
119 UserModel().create_or_update(username, password, email, firstname,
120 password=password,
120 lastname, active, admin, ldap_dn)
121 active=active,
122 admin=admin,
123 name=firstname,
124 lastname=lastname,
125 email=email,
126 ldap_dn=ldap_dn)
127 UserModel().create_ldap(username, password, ldap_dn, form_data)
128 return dict(msg='created new user %s' % username)
121 return dict(msg='created new user %s' % username)
129 except Exception:
122 except Exception:
130 log.error(traceback.format_exc())
123 log.error(traceback.format_exc())
General Comments 0
You need to be logged in to leave comments. Login now