2 new API functions acs_user::promote_person_to_user and acs_user::demote_user (see issue #3461)
acs_user::promote_person_to_user
Promotes a person/party to an ACS user.
@param person_id the person_id in the acs system that should be promoted to a user. @param username the username to be used for this user. Defaults to the person's email @param password the password to be used for this user. Defaults to a randomly generated password. @param authority_id the authority that will be used for the user.
@param locale locale to be used in user preferences. Defaults to the site wide locale is taken.
@return The user_id of the person promoted to user
@error An error is thrown if the username is already in use, or the person_id has no email address, or if person_id is not in the persons table.
acs_user::demote_user Demotes an ACS user to a person/party.
This will fail if other tables have content referencing the users table. It is probably best for tables created in other packages to reference persons, parties, or acs_objects instead. This proc could be extended with an option to find all referenced tables and remove rows referencing this user.
See the following FK relationship in basic OpenACS installations: