Forum OpenACS Development: Re: convert person to user
my two cents here: to promote a person to a full-fledged user is a matter of adding the appropriate entry in the users table. Probably other operations are required, e.g. adding membership to the main subsite etc, but should be absolutely possible to figure it out and put it into some proc or so.
What we would need to discuss IMO is the UI interaction for this. One possibility might be:
- user tries to log in using an email that already belongs to a party/person
- user is informed and invited to decide whether to "promote" itself or use another email
- upon choice, the "upgrade" is executed
I expect there to be corner cases though: what impact can have on the business logics of my application that something that before was "just" a person has now become a user? I think this is tricky to answer in general. One problem I can think about is e.g. when a user decide to leave a community. We might still want to retain its information as a "person" for our application (something like a "downgrade" to person).
Maybe somebody else want to chime in.
I could share those two procs.
While promoting is straightforward, demoting has certain limitations in case this user has created several objects before (check to FK relations of users). Therefore, demoting is rather a low-level helper function and not intended as a replacement of "acs_user::change_state" which can be used to deactivate users in various ways.