Set User Security Pin Through Gateway Script

Is there a method for setting the user's security pin through scripting? We are able to add the users to a user source and set their information but would also like to set the security pin.

We are using version 8.1.38

editUser = system.user.getUser("project_name"),

set pin

editUser.set("user.pin", "9999")
#save changes
response=system.user.editUser("project_name", editUser)

Ted, please see Wiki - how to post code on this forum.