Updated returned codes for user API functions