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

Show userLicenseType in getDatabaseUsers() (Ticket: 8786) #128

Open
Ryo-N7 opened this issue Jul 5, 2024 · 0 comments
Open

Show userLicenseType in getDatabaseUsers() (Ticket: 8786) #128

Ryo-N7 opened this issue Jul 5, 2024 · 0 comments
Milestone

Comments

@Ryo-N7
Copy link
Collaborator

Ryo-N7 commented Jul 5, 2024

Hi all,

This is already a ticket and I know you guys are working on it but since I made my own changes recently, I thought I'd contribute along with a few other minor improvements.

  • inviteTime has been changed to inviteDate in the API output, so that's reflected here
  • i've also added lastLoginDate with the use of the null2na() helper function since those may be NULL for users who haven't accepted their invite yet.
  • activationStatus
  • then of course I've set userLicenseType as well.
    null2na <- function(y) if (is.null(y) || !nzchar(y)) NA else y
    
    usersDF <- data.frame(
      databaseId = unlist(lapply(users, function(x) {x$databaseId})),
      userId = unlist(lapply(users, function(x) {x$userId})),
      name = unlist(lapply(users, function(x) {x$name})),
      email = unlist(lapply(users, function(x) {x$email})),
      version = unlist(lapply(users, function(x) {x$version})),
      inviteDate = as.Date(unlist(lapply(users, function(x) {x$inviteDate}))),
      lastLoginDate = as.Date(unlist(lapply(users, function(x) null2na(x$lastLoginDate)))),
      deliveryStatus = unlist(lapply(users, function(x) {x$deliveryStatus})),
      inviteAccepted = unlist(lapply(users, function(x) {x$inviteAccepted})),
      activationStatus = unlist(lapply(users, function(x) {x$activationStatus})),
      userLicenseType = unlist(lapply(users, function(x) {x$userLicenseType}))
      # role = lapply(users, function(x) {x$role})
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants