Created
October 19, 2012 05:21
-
-
Save z3cka/3916378 to your computer and use it in GitHub Desktop.
page preprocess var for login/logout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ninsixty_spw_preprocess_page(&$vars) { | |
global $user; | |
if ($user->uid != 0) { | |
// code for the logout button | |
$vars['loginout'] = "<a href=\"/user/logout\">Log out</a>"; | |
} else { $vars['loginout'] = NULL; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
and put this in your page tpl: