Roundcube Community Forum

Release Support => Release Discussion => Topic started by: Wazooka on September 01, 2008, 06:55:49 PM

Title: Prefilled login username?
Post by: Wazooka on September 01, 2008, 06:55:49 PM
Hello

How can I make the login username already be filled out? And autofocus on the password field?
Title: Prefilled login username
Post by: Wazooka on September 04, 2008, 07:24:12 AM
BoinkBoink
Title: Prefilled login username
Post by: JohnDoh on September 04, 2008, 08:19:37 AM
http://www.roundcubeforum.net/showthread.php?t=3452

I think the focus goes to the password box automatically if the username is filled.
Title: Prefilled login username
Post by: Wazooka on September 05, 2008, 08:33:13 AM
Didn't work on my 0.2 alpha.

In rcube_template.php I replaced
Code: [Select]

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


with
Code: [Select]

$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?
Title: Prefilled login username
Post by: JohnDoh on September 05, 2008, 01:43:39 PM
yes you can hard code it, also try http://domain.com/mail/?_user=foo coz that is what the code is looking for :p
Title: Prefilled login username
Post by: Wazooka on September 05, 2008, 03:50:11 PM
Still doesn't work helas :)

Btw the other thread did list:
Quote

ex : http://mywebsite/mail/?username=foo

:D Well, up to hardcoding it?
Title: Prefilled login username
Post by: Wazooka on September 10, 2008, 06:54:41 PM
BoinkBoink
Title: Prefilled login username
Post by: JohnDoh on September 11, 2008, 06:49:51 AM
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.
Title: Prefilled login username
Post by: Wazooka on September 11, 2008, 03:43:04 PM
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!