Use the wp user data to protect a folder with .htaccess
-
I’m looking for suggestions how to approach this:
I have a free website but want to restrict some of the content download to registered users. It is a bit complicated scenario but what I need is basically that a folder is protected via .htaccess and this .htaccess folder can be accessed by users with their wp user login details.
My idea is currently to do the following (probably not very elegant way of doing this…):
1. Find the hooks / actions that register / update user details.
2. Write a script that whenever a new user registers or updates his details the whole member details are read out and a new .htaccess file is written in the folder that I want to protect.I would appreciate suggestions for a better way to do this and I don’t really know where to start right now and what hooks / actions I should look at.
- The topic ‘Use the wp user data to protect a folder with .htaccess’ is closed to new replies.