Tuesday 12 July 2005 4:03:12 am
Hi, I am trying to decide what would be the best way to achieve what follows: I have a database of non - eZpublish-like user data, coming from a legacy application. Now we are developing an eZ solution in which most of those users will be creating their own profiles. Some will be new users, others will be old users which need to hook their eZ profile with their old profile data. What we need to do, is implement this logic:
0) We have a WTUser class which is just like the User class, but with an IDAnagraphic field, which defaults to 0.
1) user starts registration process inserting desired login, password and email as now is by default eZ registration procedure. (we could need more fields to be entered too, at this point).
2) the system checks whether the provided email is into the legacy user data, which is accessed through a custom-developed extension.
3) if there is a match, the unique numeric ID from the legacy data is copied into the IDAnagraphic field for the user. 4) Registration proceeds as normal, with sending of activation emails, etc.
So, basically, the challenge is:
- calling the custom extension to check for emails and ID (I have defined fetch methods for it, so I can use them in templates)
- modifying the flow of operations for the registration process, so that the operations above will override the normal user registration process. - make a solution that will work even for new users (that is, no legacy profile available).
I have no idea on how to do it cleanly.
hacking the kernel?
creating a custom workflow? and if so, how? ... or maybe just forget about default user registering and write my own user register logic from absolute scratch? (*yeck*) Any suggestions or pointers are appreciated.
|