It's all working fine except I can't find a nice way to perform the logout. It works if you do the same link as in the admin page:
Code: Select all
serendipity_entries.php?serendipity[adminModule]=logout
I can do a "serendipity[action]=logout" and catch that within the plugin, and then do a "serendipity_logout()":
Code: Select all
if (isset($serendipity['GET']['action']) && $serendipity['GET']['action'] == 'logout') serendipity_logout();
if (serendipity_userLoggedIn()){
echo '<a href="?serendipity[action]=logout">Logout</a></div>';
} // else draw username / password boxes
I'm new to php (although not to programming) so forgive me if I've missed something obvious.