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

Allow user 0 as role #28403

Merged
merged 1 commit into from Jul 18, 2017
Merged

Allow user 0 as role #28403

merged 1 commit into from Jul 18, 2017

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Jul 17, 2017

Description

If the user id is "0" then the string here is considered "empty" and was causing an exception.
Allow the string "0" because a user id "0" can be created in the GUI or with the occ command.

Related Issue

#28406

Motivation and Context

I noticed that:

php occ user:delete 0

throws a big red exception message.
(Although the user does seem to be deleted)

How Has This Been Tested?

Try:

php occ user:add 0
php occ user:list
php occ user:delete 0

The user is added (can be seen in the list). The delete throws a red exception.
After the change it works without the big red exception message.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note: it would be nice to have a suite of automated acceptance tests for the occ command some day.

@PVince81
Copy link
Contributor

classic PHP...

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@phil-davis phil-davis added this to the development milestone Jul 17, 2017
Signed-off-by: Phil Davis <phil@jankaritech.com>
@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants