Roundcube Community Forum

 

How to transform login?

Started by i3z, April 24, 2009, 12:00:39 PM

Previous topic - Next topic

i3z

I wish to simplify input. I should enter login like site.com+user consisting of two parts - domain (do not match with imap server) and username. Somebody can tell how to transform login? I wish to enter simply user. And site.com let is added automatically.

patterned

Edit this:
$rcmail_config['username_domain'] = 'domain.com';

in this:
roundcube/config/main.inc.php

You can also turn it into an array for multiple domains, which the main.inc.php file explains.

i3z

You do not understand (sorry, my english is very bad).

My username, which is required by imap-server is mymail.com+john, not [email protected]. And i whant to cut this part in my username: "mymail.com+" and leave "john".

I can not do this by edit 'username_domain'.

i3z

This problem can't be resolved?

JohnDoh

I dont think there is any way you can do this in the default code but its very easy to mod  program/include/rcmail.php to do what you want (search for $config['username_domain'] and you will see how it works at the moment)

If you dont want to patch the core then you might also be able to do this using the new plugin api (Doc_Plugins ? RoundCube Webmail) there is an authenticate hook which will let you change the username between when it is input by the user and sent to the server i think.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

corbosman

This is trivial through the plugin API.

i3z