Arrow

redirect to a page that one specified user can access | Peter's Login Redirect | Forum

Back to the login redirect plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
redirect to a page that one specified user can access
October 6, 2011
10:47 am
ngentile
Guest

Hello, Can I use this plugin to redirect a user that is logging to a page that only they can see? I want to create pages for each user so I can display content just for them. Thank you for any help you can give!

October 6, 2011
11:33 am
Peter
Admin
Forum Posts: 841
Offline

Hi,

Yes, by using the syntax "[variable]username[/variable]" (documented in the plugin's readme.txt) you could craft URLs that are specific to users. However, this plugin does not cover user permissions — for that you'll have to use a plugin for that purposes, or build some logic into the relevant template to do the necessary checks.

October 14, 2011
3:16 am
Al12
Guest

Where is the read me txt file?

October 14, 2011
3:29 am
Al12
Guest

Dumb question sorry. I found the read me txt. But how do I redirect a user to a private page on my site?

October 15, 2011
1:06 am
Peter
Admin
Forum Posts: 841
Offline

Hi Al12,

In short, you can redirect to any page on your site, as long as the user has the permissions to view it. To manage permissions, though, you'd need a different plan, as my plugin only deals with redirects.

October 19, 2011
6:23 am
Charlie
Guest

I installed this plug-in and redirecting users back to the home page works fine. I don't want them going to the Dashboard or any of that. NOW I'm looking at this redirection to a personal page just for that user. User accounts are created by the admin. I understand how to put the variable in the URL for the user, but .... and pardon my ignorance here ... when I create pages in WordPress, the URL has a page_id, not a name. If I have a user named user1, for example, how do I craft a page that will have the username in the URL instead of a page_id?

This is for a site having to do with race horses. I'd like to give the clients a way to go to a personal page with any notes about training progress, race results, etc, but the information would be only pertaining to that client and the clients will not be able to see anyone else's information but their own.

This user name in the URL has me stopped at the moment :)

Thanks

October 19, 2011
11:40 am
Peter
Admin
Forum Posts: 841
Offline

Hi Charlie,

I can think of a couple of options:
- Build a special page type on WordPress with its own template that responds to the username variable in the URL so that the page content is built based on the URL variable
or
- If you have a small number of user-specific pages, you could build a mapping of username to page ID. To have that take effect in the redirect plugin, though, you'd have to build that mapping in the rulRedirectFunctionCollection::rul_get_variable() function in the plugin file.

Both options require coding in PHP.

October 19, 2011
12:49 pm
Charlie
Guest

Peter,
Thanks for the response. I found a solution. I use your redirect plug-in along with another plug-in called User Specific Content.

I created a page for a particular user (User-1 Information page). The User Specific Content plug-in adds meta information to the page creation page and I can select who can view this page by Role or by specific username (or whether the user is logged in or not),

After creating that page I use your redirect plug-in and point the use to that page as their redirect. It works beautifully! If another user logs in and plays with the address bar trying to guess at another user's page, they see a message telling them their current login does not allow viewing the page content.

There are only a few users who will use this. (Less than 25). So I'm not sure if or how this would work on a much larger scale, but for my purposes it works perfectly.

So, thank you again for the help!

-- Charlie