getting user information (last login etc)

Permalink
Hi there, I need to get the data associated with a user

$ui = UserInfo::getByID(2);
$numberoflogins = $ui->getNumLogins();
echo $numberoflogins;
$lastlogin = $ui->getLastOnline();
echo $lastlogin;


The first bit of code successfully returns the number of logins, but the second is showing a timestamp, but I can't recognise it as a date/time.

Is this in an unformatted version? If so, hoew can I get it to show the date & time of the last login?

Thanks very much in advance

Rob

rc255
 
ConcreteOwl replied on at Permalink Best Answer Reply
ConcreteOwl
Try this
$ui = UserInfo::getByID(2);
$numberoflogins = $ui->getNumLogins();
echo $numberoflogins;
echo "...";
$lastlogin = $ui->getLastOnline();
echo date("jS M Y", $lastlogin);
rc255 replied on at Permalink Reply
rc255
brilliant, thanks weyboat... I should've known that, but my brain is having a bit of trouble recently

Cheers