Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Jan 27, 2022

Fix #30715

When running occ user:info on a non-existing user you get:

user not found

which is expected, but when running occ user:info on a user which exists but never logged id, you get:


In OC_Helper.php line 496:
                                 
  [OCP\Files\NotFoundException]  
                                 

user:info [--output [OUTPUT]] [--] <user>

with this PR you will get:

  - user_id: user2
  - display_name: user2
  - email: 
  - cloud_id: [email protected]
  - enabled: true
  - groups:
  - quota: none
  - storage:
  - last_seen: 1970-01-01T00:00:00+00:00
  - user_directory: /var/www/html/data/user2
  - backend: Database

Here is what it looks like for a user who did log in:

  - user_id: user4
  - display_name: user4
  - email: 
  - cloud_id: [email protected]
  - enabled: true
  - groups:
  - quota: none
  - storage:
    - free: 275530956800
    - used: 20575003
    - total: 275551531803
    - relative: 0.01
    - quota: -3
  - last_seen: 1970-01-01T00:00:00+00:00
  - user_directory: /var/www/html/data/user4
  - backend: Database

Signed-off-by: Côme Chilliet [email protected]

@come-nc come-nc self-assigned this Jan 27, 2022
@come-nc come-nc added 3. to review Waiting for reviews bug labels Jan 27, 2022
@come-nc come-nc requested a review from a team January 27, 2022 15:37
@come-nc
Copy link
Contributor Author

come-nc commented Jan 27, 2022

/backport to stable23

@come-nc
Copy link
Contributor Author

come-nc commented Jan 27, 2022

/backport to stable22

@come-nc
Copy link
Contributor Author

come-nc commented Jan 27, 2022

/backport to stable21

@szaimen
Copy link
Contributor

szaimen commented Jan 27, 2022

cc @enoch85

@szaimen szaimen added this to the Nextcloud 24 milestone Jan 27, 2022
Copy link
Member

@CarlSchwan CarlSchwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@come-nc come-nc merged commit 3231b3f into master Jan 27, 2022
@come-nc come-nc deleted the fix/fix-user-info-notfoundexception branch January 27, 2022 17:12
@come-nc come-nc added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 27, 2022
@backportbot-nextcloud
Copy link

The backport to stable22 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable21 failed. Please do this backport manually.

@szaimen
Copy link
Contributor

szaimen commented Jan 27, 2022

Is it possible that this was only a problem in nc23?

@solracsf
Copy link
Member

solracsf commented Jan 27, 2022

When i run it on NC22 on a never logged-in user:

$ occ user:info steph.brun
  - user_id: steph.brun
  - display_name: Stéph Brun
  - email: [email protected]
  - cloud_id: [email protected]
  - enabled: true
  - groups:
    - Group 1
    - Group 4
    - Group 6
  - quota: 50 GB
  - last_seen: 1970-01-01T00:00:00+00:00
  - user_directory: /nextcloud/data/steph.brun
  - backend: Database

@enoch85
Copy link
Member

enoch85 commented Jan 28, 2022

Thank you!! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

occ user:info fails to retrive any info

7 participants