[horde] Get a list of (active) Horde users

Olaf Hopp Olaf.Hopp at kit.edu
Tue Aug 25 09:14:29 UTC 2020


On 8/24/20 7:54 PM, Jens Wahnes wrote:
> Olaf.Hopp at atis.uka.de wrote:
>> I can write myself a script for that, but I do not want to reinvent the wheel.
>> Maybe anybody can share his script.
> 
> Since I seldomly need to look up these kind of figures, I usually end up doing something along the lines of
> 
> select count(*) from horde_prefs where pref_name='last_login' and pref_scope='horde' and substring_index(substring_index(pref_value, 'time";i:', -1), ';', 1) >= unix_timestamp(date_sub(now(), interval 7 day));

Thanks Jens,
replacing "count(*)" by "pref_uid" and "7 day" by "1 month" gave me exactly the
list of accounts I am looking for.
I need this list to inform users in case of service outages.

Regards, Olaf


-- 
Karlsruher Institut für Technologie (KIT)
ATIS - Abt. Technische Infrastruktur, Fakultät für Informatik

Dipl.-Geophys. Olaf Hopp
- Leitung IT-Dienste -

Am Fasanengarten 5, Gebäude 50.34, Raum 009
76131 Karlsruhe
Telefon: +49 721 608-43973
Fax: +49 721 608-46699
E-Mail: Olaf.Hopp at kit.edu
atis.informatik.kit.edu

www.kit.edu

KIT – Die Forschungsuniversität in der Helmholtz-Gemeinschaft

Das KIT ist seit 2010 als familiengerechte Hochschule zertifiziert.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5212 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.horde.org/archives/horde/attachments/20200825/39df5baf/attachment.bin>


More information about the horde mailing list