Wednesday 03 June 2015 2:37:09 pm - 4 replies
I am using the API to get users from a specific group. My problem is that i need the last_login_timestamp of the users. The User class of the API does not have that kind of data.
1) Am I able to use the eZ 5 API to get the last_login_timestamp ? or do I have to use the legacy stack to get the users ?
Here is the code I am using :
$repository = $this->getContainer()->get('ezpublish.api.repository'); $repository->setCurrentUser($repository->getUserService()->loadUser(14)); $userService = $repository->getUserService(); $userGroup = $userService->loadUserGroup(60); $myUsers = $userService->loadUsersOfUserGroup($userGroup);
The data I am interested in is in the ezuservisit table "last_login_timestamp"
2) Is it possible with the new stack to write a query in SQL directly ? or even using filter (criterion) to look for the data I need ?
Wednesday 03 June 2015 6:07:43 pm
Sorry for my late reply. But I think you have this solved now.
I think that using the legacy stack is the right answer at this time since to my knowledge this is one of those additional use cases not (yet?) supported by the new stack.
Wednesday 17 August 2016 4:08:27 pm
Plenty of ways to archive this using custom code in new stack, or someone could contribute to add the feature. With legacy being the most feature rich CMS made in history, some less central features are missing, but contributions are always welcome
You must be logged in to post messages in this topic!