Hello all,
I'm trying to display the last login date for each user in my fabrik user list. I am getting this information from the joomla users table in the "lastvisitDate" element.
I have created a Date element (I also tried a field element type) and have the following in my Default value:
$db =& JFactory::getDBO();
$query = "SELECT `userID` FROM `users` WHERE `ID` = '{rowid}'";
$db->setQuery($query);
$userid = $db->loadResult();
$cname = '{$their->$userid->lastvisitDate}';
return $cname;
For what ever reason, it keeps returning the current user's information instead of the user who I am editing.
Also, is there a better way to do this? This is a new element for an existing list. I would like to have each existing record display the last login date in the list view without having to edit each user.
Thanks for your help!
I'm trying to display the last login date for each user in my fabrik user list. I am getting this information from the joomla users table in the "lastvisitDate" element.
I have created a Date element (I also tried a field element type) and have the following in my Default value:
$db =& JFactory::getDBO();
$query = "SELECT `userID` FROM `users` WHERE `ID` = '{rowid}'";
$db->setQuery($query);
$userid = $db->loadResult();
$cname = '{$their->$userid->lastvisitDate}';
return $cname;
For what ever reason, it keeps returning the current user's information instead of the user who I am editing.
Also, is there a better way to do this? This is a new element for an existing list. I would like to have each existing record display the last login date in the list view without having to edit each user.
Thanks for your help!