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

authentication - Access to customer profile with pin code

programmeradmin2浏览0评论

I am trying to achieve the following

Customer has their profile page and can edit it etc

I would like anyone with the URL to view a customers profile details by entering a pin code (prompted) after entering the URL in a browser. I have tried with ultimate member plugin but no luck. Any suggestions?

I am trying to achieve the following

Customer has their profile page and can edit it etc

I would like anyone with the URL to view a customers profile details by entering a pin code (prompted) after entering the URL in a browser. I have tried with ultimate member plugin but no luck. Any suggestions?

Share Improve this question asked Jan 7, 2020 at 7:40 CamnuckCamnuck 1 1
  • WordPress supports per-page passwords (Status & Visibility, Visibility Password Protected) - you could hook into that? – Rup Commented Jan 7, 2020 at 9:45
Add a comment  | 

1 Answer 1

Reset to default 0

Users aren't stored as a post type like most other content in WordPress so you can't use the per-page password feature in core. You can add a custom meta field to Users for the pin and then add some functions for displaying/handling the form, checking if the pin is valid, and so on.

Another option would be to use a custom post type to implement the public user profiles. With this option you'd be able to leverage the content password features in core. You'd set the pin for the custom user profile post type, show the form using get_the_password_form(), and check for the password using post_password_required().

Reference Using Password Protection on the Wordpress documentation site for more information.

发布评论

评论列表(0)

  1. 暂无评论