lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
637 stars 208 forks source link

Update ValidationRules.php #428

Closed rafinhaa closed 2 years ago

rafinhaa commented 3 years ago

When a request of type "application/json" was received, it caused an Exception of type ErrorException with the message "Undefined offset: 1". This was because the buildUserFromRequest method in the myth-auth/src/Authentication/Passwords/ValidationRules.php file was not prepared for this request. This patch fixes this issue.

lonnieezell commented 3 years ago

Sorry to get here so late. If you could add a test for this case I think it's ok. The only possible issue is what if the body is empty?

rafinhaa commented 3 years ago

Hi, I have no experience with automated tests, do you have any support material?

MGatner commented 2 years ago

This will need the tests (see existing examples) and updates to the docs since it adds an otherwise-hidden feature. @rafinhaa are you around to rebase and update this PR after #517 is merged?

rafinhaa commented 2 years ago

I'm working with another technology and I don't have time for these changes right now.