![]() |
|
|
|||||||
| For more information about the ads and why they're here, please see the FAQ |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I just downloaded RoundCube, and I love it so far. I host over 50 domains and people hated typing in their full email addresses to login. This will only work if you have mail.domain.com, mail.domain2.com, etc. I quickly made a solution.
![]() Before you start, make backups. index.php Under if ($_action=='login' && $_task=='mail'){ add : Code:
$user = "$_POST[_user]@" . substr($_SERVER[HTTP_HOST], 5) . ""; Code:
else if (isset($_POST['_user']) && isset($_POST['_pass']) && rcmail_login($_POST['_user'], $_POST['_pass'], $host)) Code:
else if (isset($user) && isset($_POST['_pass']) && rcmail_login($user, $_POST['_pass'], $host)) program/include/main.inc Find function rcmail_login_form($attrib) Change Code:
$input_user = new textfield(array('name' => '_user', 'size' => 30));
Code:
$input_user = new textfield(array('name' => '_user', 'size' => 15));
Code:
$fields['user'] = $input_user->show($_POST['_user']); Code:
$fields['user'] = "" . $input_user->show($_POST['_user']) . " @ " . substr($_SERVER[HTTP_HOST], 5) . ""; Good luck! |
|
#2
|
||||
|
||||
|
Easier than properly configuring the main.inc.php file?
PHP Code:
Heck... you can take it one step further in ease: PHP Code:
__________________
![]()
|
|
#3
|
||||
|
||||
|
thx for both tutorials
![]() |
|
#4
|
|||
|
|||
|
Its good code, But I only have one domain
![]() |
|
#5
|
|||
|
|||
|
ok guys, the second solution sounds great but its not really useful.
all my customers also use: mail.domain1.com mail.domain2.com etc... that means I do not want them to see a dropdown of all the domains I host (in coolants example it would be a dropdown list of 50 domains) and chose theirs from the list, instead roundcube should be able to detect the domain where the user logged in from, strip mail. from it and append it to the username, at least thats what some plugins for squirrelmail can do... |
|
#6
|
||||
|
||||
|
Hmm..... so you'd want something like:
PHP Code:
__________________
![]()
|
|
#7
|
|||
|
|||
|
Cool plugin but i was wondering lets say you only have one domain
and i don t want my users to have to type in their domain and or server info think you could make something for that ![]() |
|
#8
|
|||
|
|||
|
yada, you can use the same example above or if you don't mind them typing in their account name (everything before @yourserver.com) and password you can do this without a plugin by specifying a domain in the config file.
|
|
#9
|
|||
|
|||
|
wow cool thanx man
![]() |
|
#10
|
|||
|
|||
|
Quote:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
| For more information about the ads and why they're here, please see the FAQ |