Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

How to get a table of registered users who logged in during the last month

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 3 months ago #284037 by timstohr
Hi Kyle,

One of my investors wants to have a table that shows who went onto the website and logged in and when and that during the last month (so if user ID xyz went on it several times per month then it should show each of these logins).

Any SQL table that tracks that? Antispam-plugin maybe?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 3 months ago #284050 by krileon
Create a userlist with an advanced filter on the lastvisitdate, which is the last date they logged in. You can access it using u.`lastvisitdate` in your query. Using SQL date functions you can limit to only those who last logged in within the previous month. See the below for date function usages.

dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html

The below might work (untested).

Code:
u.`lastvisitdate` >= DATE_SUB( NOW(), INTERVAL 1 MONTH )


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • timstohr
  • timstohr
  • OFFLINE
  • Posts: 1091
  • Thanks: 56
  • Karma: 9
8 years 3 months ago #284051 by timstohr
Hi,

This is not what I meant :)

Is any part of CB (plugin or core) logging somewhere in the database which registered user has logged in when (and not only last login date since they are using the website every day)? I would then export the table as CSV, format it, make it look pretty and send it off to the investor (dont want to present this on the front-end).

Also, you have a bug in the email notifications. The READ MORE and the link in the email were missing the domain name:..

Here is what I did which possibly caused the problem: I clicked on NEW TOPIC in the Kunena header bar and then chose the Professional Forum.
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
8 years 3 months ago #284053 by krileon

Is any part of CB (plugin or core) logging somewhere in the database which registered user has logged in when (and not only last login date since they are using the website every day)? I would then export the table as CSV, format it, make it look pretty and send it off to the investor (dont want to present this on the front-end).

No, last visit date, registration date, and last update date are all that are tracked. The first 2 are entirely tracked by Joomla and are in the _users table.

Also, you have a bug in the email notifications. The READ MORE and the link in the email were missing the domain name:..

Known Kunena bug. We're working on an RC here so bound to be some issues ;)


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum