Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Add creation date to user listing #29772

Closed
hodyroff opened this issue Dec 6, 2017 · 7 comments
Closed

[FR] Add creation date to user listing #29772

hodyroff opened this issue Dec 6, 2017 · 7 comments

Comments

@hodyroff
Copy link

hodyroff commented Dec 6, 2017

https://demo.owncloud.org/settings/users

Add to the settings:
"Show user creation date"

Get date from the activity for the user.
Idea: SELECT timestamp FROM oc_activity WHERE file LIKE '%ownCloud Manual.pdf%' AND user=myuser

Add a coloumn which shows the date not the since.

@hodyroff hodyroff added this to the development milestone Dec 6, 2017
@PVince81
Copy link
Contributor

What qualifies as user creation ?

The query above (hacky) implies it's the time of the first login, whenever the skeleton was copied. This would be the same date like the last login which is already available in the settings page. (see bottom-left options to display hidden columns)

It could also mean:

  • the date the user was imported to oc_accounts table through user:sync (ex: LDAP), which is the date where the user got known to OC, not necessarily the date the user was added to the LDAP server
  • the date the user was created over the settings/users page using manual creation

Any specific use-case, reason ?

@PVince81
Copy link
Contributor

Had a chat with @hodyroff and it turns out I mixed up "first login" with "last login".

Proposal:

  • add a new column oc_accounts.first_login
  • populate that column at the same time where we copy the skeleton in the code (first time login)
  • at update time, find that information for already existing users from another location (to be defined)
  • display that value as a regular date (no "since") in the settings/users page

@pmaier1 @DeepDiver1975

@PVince81
Copy link
Contributor

Now to find when the formerly existing users logged in the first time:

  • use oc_activity query proposed in OP, however this will not work if activity app is disabled
  • we looked at the timestamp of the folder "data/$userId/" but it seems it only has mtime, no creation time (at least not on my BTFS)
  • other ideas ?

@guruz
Copy link
Contributor

guruz commented Dec 12, 2017

Can't this be a separate app? ;-)

@PVince81
Copy link
Contributor

also expose over provisioning API as read-only field

@freakynl
Copy link

freakynl commented Apr 8, 2020

Hi,
no progress on this?

Our customer wants insights in whether or not created users (in the local database, no AD/LDAP connections) in say the last 2-3 months actually signed in once.

Now I can check the last logon date of course, but that doesn't tell him when they were created at all.

Don't know all the existing queries against the database, but adding a timestamp field to oc_users, for example as: created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, would probably fix this easily.

@micbar micbar removed the PM prio 1 label Jan 18, 2021
@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically closed.

@stale stale bot closed this as completed Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants