Horde login Language Selection doesn't "stick"?

stardotstar

Well-Known Member
Sep 14, 2009
68
0
56
I have been reading many posts here mostly dating back a while that seem to indicate the the "feature" whereby one has to select the language for the Horde session on every login is something we have to live with. Is that right or am i missing a configuration or other setting which will allow my users to select autologin to Horde and wind up only having to enter their username and password instead of having to select the language for the session every time.

From what I can see the selection of the language does not "stick" even if it is set in the options in Horde. I also note that other settings are saving state properly.

I can't really find too much about this on the web at large so maybe I am getting something not very common.

One user has stated that the process of logging in to check their webmail (using horde in this instance) is slow and clunky. Am I missing something to allow users to just have to login with their username and password and then be served up their horde inbox? (I have the opening page set to mail in horde and this is sticking - its just the mail client intermediate window with the autoload in x seconds followed by the language dropdown that I think is causing the appearance of a slow process.)

TIA
Will
 

stardotstar

Well-Known Member
Sep 14, 2009
68
0
56
Is anyone else even aware of this "problem" maybe I have an unusual issue and should lodge a ticket?
Will
 

stardotstar

Well-Known Member
Sep 14, 2009
68
0
56
OK I have done some digging since lodging a ticket with WHM/cPanel and being instructed that it is definitely a "horde" thing and normal behavior.

So...

I find the layout of horde in cPanel thus:

Code:
[email protected] [~]# locate horde
/scripts/fullhordereset
/scripts/neomail2hordeaddrbook
/scripts/resethorde
/usr/local/cpanel/3rdparty/etc/horde
/usr/local/cpanel/3rdparty/etc/horde/php.ini
/usr/local/cpanel/base/horde
/usr/local/cpanel/base/frontend/x/images/horde.gif
/usr/local/cpanel/base/frontend/x3/branding/horde.gif
/usr/local/cpanel/base/frontend/x3/images/horde.gif
/usr/local/cpanel/base/frontend/x3mail/branding/horde.gif
/usr/local/cpanel/base/horde/COPYING
/usr/local/cpanel/base/horde/README
/usr/local/cpanel/base/horde/admin
/usr/local/cpanel/base/horde/config
/usr/local/cpanel/base/horde/docs
/usr/local/cpanel/base/horde/imp
/usr/local/cpanel/base/horde/index.php
...
and in index.php note that the language selection is driven by:

Code:
/* Build the <select> widget containing the available languages. */
if (!$prefs->isLocked('language')) {
    $_SESSION['horde_language'] = NLS::select();
    $langs = '<select name="new_lang" onchange="selectLang()">';
    foreach ($nls['languages'] as $key => $val) {
        $sel = ($key == $_SESSION['horde_language']) ? ' selected="selected"' : '';
        $langs .= "<option value=\"$key\"$sel>$val</option>";
    }
    $langs .= '</select>';
}
It seems that the best way to disable this is to pre-set the isLocked('language')

This appears in config/prefs.php

Code:
// user language
$_prefs['language'] = array(
    'value' => '',
    'locked' => true,
    'shared' => true,
    'type' => 'select',
    'escaped' => true,
    'desc' => _("Select your preferred language:")
);
Changed locked to true from false.

This removes the selection drop down from the login window but still requires the user intervention at that point --> click "Log In"

I am still investigating the methods available to remove this login page which requires user intervention for those of us who want to presuppose a language for users (on login at least) and take advantage of the pre-auth provided by the webmail. cpanel redirection index...

Will
 

lauer

Member
Aug 29, 2008
9
0
51
My Solution...

Hi

My solution is to add the following line before the last </script> in /usr/local/cpanel/base/horde/templates/login/login.inc
Code:
document.horde_login.submit();
It does work, but I am almost sure that you need to do the change each time horde gets updated.
 

stardotstar

Well-Known Member
Sep 14, 2009
68
0
56
Hi and thanks for that - its a great suggestion. I will try it.
Horde themselves blame the cPanel modified version of horde and won't contribute to any suggestions.

Thank you!

Will