Roundcube Community Forum

 

Prefilled login username?

Started by Wazooka, September 01, 2008, 06:55:49 PM

Previous topic - Next topic

Wazooka

Hello

How can I make the login username already be filled out? And autofocus on the password field?

Wazooka


JohnDoh

http://www.roundcubeforum.net/showthread.php?t=3452

I think the focus goes to the password box automatically if the username is filled.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Wazooka

Didn't work on my 0.2 alpha.

In rcube_template.php I replaced

$table->add(null, $input_user->show(get_input_value('_user', RCUVE_INPUT_POST)));


with

$post_user = get_input_value('_user', RCUVE_INPUT_POST);
if (!empty($post_user))
    $table->add(null, $input_user->show($post_user));
else
    $table->add(null, $input_user->show($_GET['_user']));


Trying http://domain.com/mail/?username=foo doesn't prefill anything.

Any other way, perhaps by just hardcoding it?

JohnDoh

yes you can hard code it, also try http://domain.com/mail/?_user=foo coz that is what the code is looking for :p
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Wazooka

Still doesn't work helas :)

Btw the other thread did list:
Quoteex : http://mywebsite/mail/?username=foo
:D Well, up to hardcoding it?

Wazooka


JohnDoh

if you want to hardcode it just replace $_GET['_user'] with what ever you want. I dont mean to be rude but may be you should learn a bit more about PHP before you start modding things.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

Wazooka

Excusez-moi. Apparently I was lacking coffee when I read your hint about it being http://domain.com/mail/?[B]_[/B]user=foo -> I missed the _ sign.

It's working great! Thanks for your assistance!