On 06/14/2013 12:16 AM, Philipp Kewisch wrote:
Any updates? I've done some more testing and found out that with the current way I am attempting to replace the user object (i.e doing so in the init() method) doesn't fully work. Login works without problems, but navigating to the settings and clicking on an identity doesn't show the identities form but instead the login window. Using the "ready" hook doesn't help either.
I suppose this might be a problem in your code.
Instead of my earlier proposal, maybe it would be more roundcube-like to add a plugin hook that takes care of creating the user objects. Maybe something like this?
user_set -- called before set_user is called params: $session_id return: rcube_user instance user_create -- called before rcube_user::create params: $user, $host return: rcube_user instance user_query -- called before rcube_user::query params: $user, $host return: rcube_user instance
Really, replacing user storage is not good idea. Users table stores user preferences and is referenced by foreign keys. So, you need user records in users table. If so, I don't see a reason for these hooks.
rcube_user::query() - the only problem with identities here is user_aliases option handling. You should disable it. and use virtuser_query plugin functionality.
rcube_user::create() - you need to abort identities creation on user create using identity_create hook.