[horde] which table holds the data of last_login?

Otto Stolz Otto.Stolz at uni-konstanz.de
Thu Jan 10 11:31:01 UTC 2008


Hello Anant S Athavale,

I had proposed:
>   select from_unixtime(pref_value,"%Y-%m-%d") as "Last Login",
>          pref_uid                             as User
>   from horde_prefs
>   where pref_name="last_login"
>     and from_unixtime(pref_value,"%Y%m%d")<20071010
>   order by pref_value;

You said:
> I find that, pref_value for pref_name->last_login contains even 
> more information.  The value of pref_value looks like this:  
> a:2:{s:4:"time";i:1199956603;s:4:"host";s:11:"10.21.3.117";}

Sorry, my answer was to quick. I took my SQL statement from my
old Imp server which is going to be shut down really soon now,
so I am interested about the late-comers who are still using it.

However, I have paid no attention to the fact that the value
of the last_login entry has changed since: Now, it comprises
also the IP address of the last login; what you see is a
linearised PHP array representing, in your example:
   array ( 'time' => 1199956603
         , 'host' => '10.21.3.117'
         )

You have already found a way to extract via SQL the desired
time-stamp from that array representation.

Best wishes,
   Otto Stolz


More information about the horde mailing list