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

[user:delete] command fails when user id is left empty #2804

Closed
daydiff opened this issue Oct 13, 2016 · 1 comment
Closed

[user:delete] command fails when user id is left empty #2804

daydiff opened this issue Oct 13, 2016 · 1 comment

Comments

@daydiff
Copy link
Contributor

daydiff commented Oct 13, 2016

Problem

When I run user:delete command trying to delete users by roles it fails with fatal error:

PHP Fatal error: Call to a member function getStorage() on null in console/src/Command/User/DeleteCommand.php on line 174

How to reproduce

  1. run user:delete
  2. leave user id empty
  3. choose user role
  4. here you get an error

Solution

Replace mistyped

$userStorage = $this->entityManager->getStorage('user');

with

$userStorage = $this->entityTypeManager->getStorage('user');
@jmolivas
Copy link
Member

PR #2805 merged

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

2 participants