Title: Require login for custom script
Last modified: August 21, 2016

---

# Require login for custom script

 *  [Pufas](https://wordpress.org/support/users/pufas/)
 * (@pufas)
 * [13 years ago](https://wordpress.org/support/topic/require-login-for-custom-script/)
 * So, I have a custom made script that redirects to a file and starts download:
   `
   mysite.com/dl/index.php?id=12345`
 * how do i make this accessible only to registered users, what code snippet do 
   i need to add to code that it would be accessible only to blog readers?
 * Thanks.
 * [http://wordpress.org/extend/plugins/registered-users-only/](http://wordpress.org/extend/plugins/registered-users-only/)

The topic ‘Require login for custom script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/registered-users-only.svg)
 * [Registered Users Only](https://wordpress.org/plugins/registered-users-only/)
 * [Support Threads](https://wordpress.org/support/plugin/registered-users-only/)
 * [Active Topics](https://wordpress.org/support/plugin/registered-users-only/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/registered-users-only/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/registered-users-only/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Pufas](https://wordpress.org/support/users/pufas/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/require-login-for-custom-script/)
 * Status: not resolved