Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions ds_wp3_private_blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ class ds_more_privacy_options {
var $l10n_prefix;

function ds_more_privacy_options() {
// keep backwards compatibility (pre-PHP5)
$this->__construct();
}

function __construct() {
global $current_blog;

if ( ! is_multisite() ) {
Expand Down Expand Up @@ -347,11 +352,11 @@ function ds_feed_login() {
//December 2012 tested with "Free RSS" for iPhone. Google Reader does not authenticate locked feeds. Tough to find a free reader that does authenticate.
global $current_blog, $blog_id;
$credentials = array();
$credentials['user_login'] = $_SERVER['PHP_AUTH_USER'];
$credentials['user_password'] = $_SERVER['PHP_AUTH_PW'];
$credentials['user_login'] = isset( $_SERVER['PHP_AUTH_USER'] ) ? $_SERVER['PHP_AUTH_USER'] : null;
$credentials['user_password'] = isset( $_SERVER['PHP_AUTH_PW'] ) ? $_SERVER['PHP_AUTH_PW'] : null;
$credentials['remember'] = true;
$user = wp_signon( $credentials, false ); //if this creates WP_User, the next 3 lines are redundant
$user_id = get_user_id_from_string( $user->user_login );
$user_id = !is_wp_error( $user ) ? get_user_id_from_string( $user->user_login ) : null;

if ( is_wp_error( $user ) ||
// "Members Only"
Expand Down