| 1 | <?php |
||
| 10 | class CreateUserCommand extends LockCommand |
||
| 11 | { |
||
| 12 | public function treatment() |
||
| 13 | { |
||
| 14 | $user = User::createFromPayload($this->input->getArgument("login"), ["roles" => ["ROLE_SUPER_ADMIN"]]); |
||
| 15 | $user->setPlainPassword($this->input->getArgument("password")); |
||
| 16 | $password = $this->getContainer()->get('security.password_encoder') |
||
| 17 | ->encodePassword($user, $user->getPlainPassword()); |
||
| 18 | $user->setPassword($password); |
||
| 19 | |||
| 20 | $this->getEntityManager()->persist($user); |
||
| 21 | $this->getEntityManager()->flush(); |
||
| 22 | } |
||
| 23 | |||
| 24 | protected function configure() |
||
| 31 | |||
| 32 | } |
||
|
|
|||
| 33 |
This check marks files that end in a newline character, i.e. an empy line.