- 🇩🇪Germany Svitlana
I tested it and sadly don't see the data in logout field.
- 🇵🇹Portugal jcnventura
As a new feature, this is only for the 2.x branch.
- Status changed to Needs review
almost 2 years ago 11:40pm 1 February 2023 - 🇦🇺Australia imclean Tasmania
@Svitlana, did you run update.php and clear the cache? Which patch did you use, or did you use the MR?
- Status changed to Needs work
almost 2 years ago 12:16am 2 February 2023 - 🇵🇹Portugal jcnventura
Doesn't really matter which version @Svitlana tested. The logout time needs to be added as well to the config/install/views.view.login_history.yml. And hook_update_8004 needs to change that view for existing installs to add the new column.
The existing MR probably works fine on 1.x, but 1.x will not get any new features.
- Status changed to Needs review
almost 2 years ago 4:05am 2 February 2023 - Status changed to Needs work
almost 2 years ago 4:07am 2 February 2023 - 🇦🇺Australia imclean Tasmania
hook_update_8004 needs to change that view for existing installs to add the new column.
- Status changed to Needs review
almost 2 years ago 4:51am 2 February 2023 - 🇦🇺Australia imclean Tasmania
@Prashant.c, patches should go against dev. Your reroll reorders some things, adds whitespaces and removes a newline at the end of a file. It'd be helpful if you could explain the reroll and provide an interdiff.
- 🇮🇳India nikhil_110
I applied the patch on my local machine using Drupal 9.5 with login history v2.x-dev. It is not working properly..when user is logout he does not see the data in logout field. Because when user logout session is destroyed and session id is different.
$current_time = \Drupal::time()->getRequestTime(); <strong>// Get current session ID and hash it. $sid = Crypt::hashBase64(\Drupal::service('session')->getId());</strong> \Drupal::database()->update('login_history') ->fields([ 'logout' => $current_time, ]) ->condition('sid', $sid, '=') ->execute();
So this code is not working properly.
I have added the test steps and Attaching the screenshot for reference.Please review.Test Step -
- Setup Drupal with login history v2.x-dev
- Enabled login history module
- Apply patch #17 - https://www.drupal.org/project/login_history/issues/3269753#comment-1490... ✨ Add logout history Needs review
- Run update.php and clear the cache
- Go to Admin > Reports > Login history
- 🇦🇺Australia imclean Tasmania
- 🇬🇧United Kingdom Dubs
I found the patch wasn't applying to the latest dev, so here's a reroll from #19
- 🇮🇳India prashant.c Dharamshala
@Dubs
Could you please add your changes to the existing MR as well so that it get easy for everyone to pull the latest changes?
- Status changed to Needs work
4 months ago 1:18pm 22 July 2024 - 🇦🇺Australia imclean Tasmania