yii2-usuario icon indicating copy to clipboard operation
yii2-usuario copied to clipboard

./yii user/create Please fix following errors:

Open bscheshirwork opened this issue 7 years ago • 3 comments

What steps will reproduce the problem?

install, migrate, try to create

./yii user/create [email protected] test

What is the expected result?

success or error description

What do you get instead?

empty error message "Please fix following errors:"

bscheshirwork avatar Oct 16 '18 12:10 bscheshirwork

So.. This check is false https://github.com/2amigos/yii2-usuario/blob/c0afdd55c948f0aac1c8ef06e2136003485e9585/src/User/Command/CreateController.php#L36 but model user has no error. https://github.com/2amigos/yii2-usuario/blob/c0afdd55c948f0aac1c8ef06e2136003485e9585/src/User/Command/CreateController.php#L44 i.e. error from mailer not processed

bscheshirwork avatar Oct 16 '18 12:10 bscheshirwork

Same error message for cath exeption: https://github.com/2amigos/yii2-usuario/blob/c0afdd55c948f0aac1c8ef06e2136003485e9585/src/User/Service/UserCreateService.php#L93-L98

bscheshirwork avatar Oct 16 '18 13:10 bscheshirwork

@bscheshirwork that I think is due that the email has not being sent. And the following should be processed: https://github.com/2amigos/yii2-usuario/blob/c0afdd55c948f0aac1c8ef06e2136003485e9585/src/User/Service/UserCreateService.php#L85

Maybe we should remove that check and add the error no matter what.

tonydspaniard avatar Oct 20 '18 10:10 tonydspaniard