A WordPress plugin that provides Headless login and authentication for WPGraphQL, supporting traditional passwords, OAuth2/OpenID Connect, JWT, and more.
GNU General Public License v3.0
66
stars
11
forks
source link
fix: get `User` model when resolving custom user type #36
Tries to coerce non-core Models into a Model\User when resolving for AuthenticationData
Why
Fixes an oversight in #30 :
The WooGraphQL customer model doesn't extend the User, and this generic shim seems like the best approach to supporting other custom types defined by the graphql_login_user_types filter.
How
Testing Instructions
Additional Info
Checklist:
[x] My code is tested to the best of my abilities.
[x] My code follows the WordPress Coding Standards.
[x] My code has proper inline documentation.
[x] I have added unit tests to verify the code works as intended.
[x] I included the relevant changes in CHANGELOG.md
Coverage: 61.707% (-0.08%) from 61.79% when pulling 591d0253d3b102deb8f371bf71a42d606eebf3e5 on justlevine:fix/woo-user-model into da3a33f80f84dd18fdfc1dc388f7be1aaf6d54c0 on AxeWP:develop.
What
Tries to coerce non-core Models into a
Model\User
when resolving forAuthenticationData
Why
Fixes an oversight in #30 : The WooGraphQL
customer
model doesn't extend theUser
, and this generic shim seems like the best approach to supporting other custom types defined by thegraphql_login_user_types
filter.How
Testing Instructions
Additional Info
Checklist: