Author Topic: Prefilled login username?  (Read 3599 times)

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username?
« 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?
« Last Edit: September 04, 2008, 07:29:55 AM by Wazooka »

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username
« Reply #1 on: September 04, 2008, 07:24:12 AM »
BoinkBoink

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,268
Prefilled login username
« Reply #2 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username
« Reply #3 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?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,268
Prefilled login username
« Reply #4 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
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username
« Reply #5 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?

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username
« Reply #6 on: September 10, 2008, 06:54:41 PM »
BoinkBoink

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,268
Prefilled login username
« Reply #7 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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Wazooka

  • Jr. Member
  • **
  • Posts: 22
Prefilled login username
« Reply #8 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!