if (!plugin_isdisabled('userhomepage')) {
$userhomepageHelper = plugin_load('helper','userhomepage');
}
// If User HomePage helper is loaded, replace standard 'Logged in as...' link (case where one or both pages don't exist is managed by User HomePage helper
if ($userhomepageHelper) {
if($INPUT->server->str('REMOTE_USER')) {
echo $userhomepageHelper->getComplexLoggedInAs();
}
} else {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
Thanks for your feedback. 👍
I changed "User link" section of documentation to keep original if (!empty($_SERVER['REMOTE_USER'])) { line and that does the trick.
If nobody is logged into a wiki it shows
Logged in as: ()
. Line 6 should remove this so I think it should be added to the docs. (https://www.dokuwiki.org/plugin:userhomepage#user_links)