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

add support for Users #33

Merged
merged 15 commits into from
Dec 1, 2020
Merged

add support for Users #33

merged 15 commits into from
Dec 1, 2020

Conversation

leogermani
Copy link
Collaborator

@leogermani leogermani commented Nov 20, 2020

This PR adds support for users functions :)

Here is a non-exaustive list of functions supported:

  • wp_insert_user
  • wp_update_user
  • wp_delete_user
  • get_userdata
  • new WP_User( $id ) to fetch a user
  • user_can
  • current_user_can
  • set_current_user
  • get_current_user_id
  • wp_get_current_user
  • get_user_meta
  • update_user_meta
  • add_user_meta
  • delete_user_meta

Test instructions

  • Look at the code (note: Metadata.php is just code moved around, disconsider)
  • Look at test-users.php in the tests
  • If you think of something else, try writing a couple of tests emulating a use case.

@szepeviktor
Copy link
Collaborator

Needs another PR...

@szepeviktor
Copy link
Collaborator

Now what?
How to press that Merge button?

@leogermani
Copy link
Collaborator Author

Now what?
How to press that Merge button?

I'm working on real tests using this here -> Automattic/jetpack#17832

Let me experiment more with this and I'll probably find issues, as I already did

README.md Outdated Show resolved Hide resolved
Co-authored-by: Viktor Szépe <[email protected]>
@leogermani leogermani merged commit f3e55e0 into master Dec 1, 2020
@leogermani leogermani deleted the add/users_support branch December 1, 2020 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants