[RCD] The identities_list hook

Philipp Kewisch pkewisch at linagora.com
Mon Jun 10 21:48:28 CEST 2013

On 6/8/13 10:11 AM, A.L.E.C wrote:
> On 06/08/2013 09:55 AM, Philipp Kewisch wrote:
>> Actually, query seems to be a problem. Here the user is initially set:
>> https://github.com/roundcube/roundcubemail/blob/master/program/include/rcmail.php#L495
>> If the user doesn't exist in the roundcube database, $user will be
>> empty. I've disabled auto_user_create since I don't want double entries
>> in the database, so I end up with the error message that the user will
>> not be created.
> I don't see a problem here. $user will be empty but after successful
> login rcube_user::create() is used. Do you want to override identities
> or maybe users database too? You initially talked about identities and I
> don't see a problem for identities.
Sorry, I'm being very confusing and I feel bad for it. Let me start at 
the beginning.

Initially I was looking for a way to use the identities from our system 
within roundcube. We also have an addressbook and authentication plugin 
that use the provided hooks. Roundcube users were being created in the 
database, auto_create_user is on. My initial thought was the same as you 
later on suggested, replace rcube_user. I then noticed the seemingly 
easy way of using identities_list, but afterwards found out its only for 
the columns and display.

I wrote my first email, where you replied that extending rcube_user 
would make sense. I went back to my original thought of replacing 
rcube_user and had success, the identities are now shown from our 
system. As I now have my own rcube_user class to work with, it makes 
sense to consolidate the authentication plugin and avoid essentially 
duplicating the users table from our system. For this to work I would 
need to replace the rcube_user::query method.

I think it would be a win for roundcube to allow plugins to easily 
replace the rcube_user class, so if you agree I'd like to discuss how to 
best go about it.

I hope this explains a bit better, I promise to be more concise in 
future emails :)


More information about the dev mailing list