For those who install WordPress in a subdirectory, or change the login URL, login will fail because the plugin uses “wp-login.php” link directly instead of the function wp_login_url().
I did like so to make it work:
Change includes/essentials.php
return $prefix.'<form action="'.get_bloginfo('url').'/wp-login.php" method="post">
to
return $prefix.'<form action="'.wp_login_url().'" method="post">
and includes/hook.php
return '<form action="'.get_bloginfo('url').'/wp-login.php" method="post">
to
return '<form action="'.wp_login_url().' method="post">
You can specify a redirect within wp_login_url().
]]>If I log in to Word press I am able to check my login status with a script like this.
However, if I login through Private Content then this will not work.
How can I check login from outside WordPress if the user only logs in to Private Content?
require_once('../wp-config.php');
require_once('../wp-includes/wp-db.php');
require_once('../wp-includes/pluggable.php');
//echo wp_get_current_user()->ID;
$current_user = wp_get_current_user();
/**
* @example Safe usage: $current_user = wp_get_current_user();
* if ( !($current_user instanceof WP_User) )
* return;
*/
echo 'Username: ' . $current_user->user_login . '<br />';
echo 'User email: ' . $current_user->user_email . '<br />';
echo 'User first name: ' . $current_user->user_firstname . '<br />';
echo 'User last name: ' . $current_user->user_lastname . '<br />';
echo 'User display name: ' . $current_user->display_name . '<br />';
echo 'User ID: ' . $current_user->ID . '<br />';
]]>
It is caused by a little issue.
Fix using redirect_to instead of redirect in lines 165 and 167:
if(strpos($loginLink, '?')) {
$loginLink .= '&redirect_to='.urlencode($_SERVER['REQUEST_URI']);
} else {
$loginLink .= '?redirect_to='.urlencode($_SERVER['REQUEST_URI']);
}
]]>
I absolutely love this plugin but I wish there was a way to only allow certain users or groups to access certain pages. I would like a few users to have complete access and others to have access to only certain pages. An ideal solution would be to have a check box on each page with a list of users and you would be able to select which users have access to that page? Any suggestions?
]]>It’s a pity… there is neither the structure (call to _()) to do this…
I modified the source to use in it-IT
Hi,
May I suggest for a future release that you add an option “Users roles who can’t see blocked content” in order for instance to block the access to the subsribers only but allow it to the authors ?
Thanks in advance
]]>As I was working with this plugin on my local, it was working fine. I also added the “wp failed login referer” action. But once on the live server it stopped. I tracked down the issue to LoginLockdown plugin. Once deactivated the wp_private started working again. Is there a way out of this?
]]>Try it in 3.2.1 but it’s not working! Thanks anyway…
]]>Whole post is invisible, just title and author visible on the site, no matter where in the post you add the [protected] / [/protected] code.
]]>