If you are using the Dokuwiki template, at the top of the file, you will see a test for
$showSidebar . The following will activate the sidebar for logged-in users only:
if(isset($_SERVER['REMOTE_USER'])) {
$showSidebar = $hasSidebar && ($ACT=='show');
}
else {
$showSidebar = false;
}
------------
Edit:
You could actually shorten that to:
$showSidebar = isset($_SERVER['REMOTE_USER'] ) && $hasSidebar && ($ACT=='show');