On 06/07/2013 02:01 PM, Philipp Kewisch wrote:
Indeed, replacing the whole rcube_user class with my own implementation is ideal, I haven't gone this route because there is some code that assumes rcube_user is the only class to handle users and this sounds more invasive to me.
Just make your class to inherit from rcube_user, no?
I initially tried to just call set_user() from the init function of the plugin, but this is already too late. Also I found out there are a few static functions that are called on rcube_user which need to be called on my class.
It's query() and create(). Query() shoudn't be a problem. In create(), after user record creation, identities are created, but you can use identity_create hook with abort=true to handle identity creation and skip default action.
A good place to replace user object is the 'ready' hook.