最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Using WP for user management

programmeradmin9浏览0评论

I want to use Wordpress for the user management of a simple web app.

What I really need to do:

  • Check if a user is logged in
  • Save meta data to a logged in user
  • Read meta data of a logged in user

Doing the register process in my web app would be nice, too, but it would also work on another page.

Is it possible to do these things "outside" of the WP installation (but on the same domain)? For example via ajax requests?

Where can I start?

EDIT:

I just read about including wp_load.php to use the WP functions. Is that a clever approach?

Thank you so much!

I want to use Wordpress for the user management of a simple web app.

What I really need to do:

  • Check if a user is logged in
  • Save meta data to a logged in user
  • Read meta data of a logged in user

Doing the register process in my web app would be nice, too, but it would also work on another page.

Is it possible to do these things "outside" of the WP installation (but on the same domain)? For example via ajax requests?

Where can I start?

EDIT:

I just read about including wp_load.php to use the WP functions. Is that a clever approach?

Thank you so much!

Share Improve this question edited Sep 29, 2020 at 14:37 Timo asked Sep 29, 2020 at 14:24 TimoTimo 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

You might want to take a look at the REST API that comes out of the box with WordPress.

Here are the docs for Users, you can register users and list/retrieve/update them https://developer.wordpress/rest-api/reference/users/

Here's the information about how to authenticate to use the API (so that you can Reigister Users for instance) https://developer.wordpress/rest-api/using-the-rest-api/authentication/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论