Koozali.org: home of the SME Server

Disable show last login time of user in Horde

Offline weblance

  • ***
  • 95
  • +0/-0
Disable show last login time of user in Horde
« on: November 22, 2011, 11:17:06 PM »
Hi,

I would like to disable the last login time shown in Horde when I login to the webmail.

The code in prefs.php:
Code: [Select]
// show the last login time of user
$_prefs['show_last_login'] = array(
'value' => true,
'locked' => false,
'shared' => true,
'type' => 'checkbox',
'desc' => _("Show last login time when logging in?")
);

I know that all I have to do is replace two of the values so that it looks like this:
Code: [Select]
// show the last login time of user
$_prefs['show_last_login'] = array(
'value' => false,
'locked' => true,
'shared' => true,
'type' => 'checkbox',
'desc' => _("Show last login time when logging in?")
);

It works, but when the server is restartet it returns to the default value.

How can I make it permanent?

/Carl

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Disable show last login time of user in Horde
« Reply #1 on: November 23, 2011, 09:32:47 AM »
Carl..

if you take a look at the top of the file , you'd see

Code: [Select]
/*
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
*/

since you are not a newbie with SME, you should know that almost everything is templates/fragments driven..

take a look here: http://wiki.contribs.org/Template_Tutorial

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Disable show last login time of user in Horde
« Reply #2 on: November 23, 2011, 09:33:50 AM »
hint.. the file to edit is 350lastlogin ;-)

Offline weblance

  • ***
  • 95
  • +0/-0
Re: Disable show last login time of user in Horde
« Reply #3 on: November 23, 2011, 09:39:46 AM »
Carl..

if you take a look at the top of the file , you'd see

Code: [Select]
/*
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
*/

since you are not a newbie with SME, you should know that almost everything is templates/fragments driven..

take a look here: http://wiki.contribs.org/Template_Tutorial

Yes I know and I've read what it says in the top  :-) But I don't know how to do the template . . . but now I do.

Thanks for your help!!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Disable show last login time of user in Horde
« Reply #4 on: November 23, 2011, 10:54:43 PM »
Yes I know and I've read what it says in the top  :-) But I don't know how to do the template . . . but now I do.
Only edit the file after copying it to the /etc/e-smith/templates-custom tree with the same relative path as it had in regards to /etc/e-smith/templates/ otherwise updates of horde will reset your changes as well.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline bosco555

  • ****
  • 152
  • +0/-0
Re: Disable show last login time of user in Horde
« Reply #5 on: March 21, 2017, 06:14:25 AM »
mkdir -p /etc/e-smith/templates-custom/home/httpd/html/horde/config/prefs.php

cp /etc/e-smith/templates/home/httpd/html/horde/config/prefs.php/350lastlogin /etc/e-smith/templates-custom/home/httpd/html/horde/config/prefs.php/350lastlogin

### Make changes to the file as above, save the file ###

expand-template /home/httpd/html/horde/config/prefs.php

Offline Jean-Philippe Pialasse

  • *
  • 2,763
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Disable show last login time of user in Horde
« Reply #6 on: March 21, 2017, 03:20:33 PM »
Carl..

if you take a look at the top of the file , you'd see

Code: [Select]
/*
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
*/

since you are not a newbie with SME, you should know that almost everything is templates/fragments driven..

take a look here: http://wiki.contribs.org/Template_Tutorial

makes me think the header is maybe not clear enough

should it add a link to the Template tutorial ?

when I open this file as a server admin I do not consider myself as a developper, and I will not follow the link.

maybe  adding :

"Administrator, if you need to modify permanently the content of this file please refer to ...."

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Disable show last login time of user in Horde
« Reply #7 on: March 21, 2017, 03:40:15 PM »
+1 for me

Offline bosco555

  • ****
  • 152
  • +0/-0
Re: Disable show last login time of user in Horde
« Reply #8 on: March 21, 2017, 11:26:48 PM »
Guys...seriously...if you just gave the man the answer in the first place this thread would have been 2-3 posts long...  :D :D 

However, I should have stated:

mkdir -p /etc/e-smith/templates-custom/home/httpd/html/horde/config/prefs.php

cp /etc/e-smith/templates/home/httpd/html/horde/config/prefs.php/350lastlogin /etc/e-smith/templates-custom/home/httpd/html/horde/config/prefs.php/350lastlogin

### Make changes to the file you just copied in templates-custom, to be as below, save the file ### use whatever editor you like:

// show the last login time of user
$_prefs['show_last_login'] = array(
'value' => false,
'locked' => true,
'shared' => true,
'type' => 'checkbox',
'desc' => _("Show last login time when logging in?")
);

expand-template /home/httpd/html/horde/config/prefs.php

I was not referring to editing the file in e-smith/templates, I was referring to the contents to be changed...

guest22

Re: Disable show last login time of user in Horde
« Reply #9 on: April 03, 2017, 10:32:56 AM »
Guys...seriously...if you just gave the man the answer in the first place this thread would have been 2-3 posts long...  :-D :-D 

The man has been long gone since 2012, so why revive an almost 6 years old thread....