I’ve just installed the latest version of B2evolution and now wanted to create a new private blog as well for friend and family only. To be able to do that I needed to be able to password protect the blog. This is not straight forward in B2 if you are not familiar with programming PHP. I would hope for that they make this a feature in backoffice in coming releases.
Anyhow, this post in the forum got me started
http://forums.b2evolution.net/viewtopic.php?t=15031&highlight=password
I needed to adjust the code a bit, so this is what I ended up with
if ( isset($blog) == “2” ) {
$login_required = true;
}
elseif (!isset($login_required)) {
$login_required = false;
}
At least because of how I have configured my blogs you will need to check if $blog is set, or else you will get an error.
