AnsweredAssumed Answered

user created using javascript API not able to login

Question asked by spatils on Sep 9, 2009
Latest reply on Mar 9, 2010 by sselvan
I have written a custom javascript API to create user.
I am able create user using following code. I can verify other properties of user from admin console.
But newly created user is not able to login.
When I try to change password of the user from admin console I get following error
"A system error happened during the operation: User name does not exist: tt1"

Am I missing somthing over here?
Is it possible to create a working user using java script API Or I must use java code for this operation?

model.username = args.username;

var person = people.createPerson(args.username);["firstName"]=args.firstname;["lastName"]=args.lastname;["email"];["userPassword"]=args.password;["password"]=args.password;["sizeQuota"]="1073741824";                                        ["disableAccount"]=false;["usr:password"] = args.password;["usr:credentialsExpire"]=false;["usr:userName"]=args.username;["usr:name"]=args.username;;
person.setPermission("Write", args.username);
person.setPermission("Delete", args.username);
person.setPermission("Read", args.username);
person.setOwner(args.username) ;;