Is there a way to have a dynamic login/logout button in primary links?

I'm using phptemplate

Comments

coreyp_1’s picture

phptemplate can pull any of the user data needed, including whether or not a user is logged in.

in your template file, add something like this:

global $user;

if ($user->uid != 0) {
// code for the logout button
}
else {
// code for the login button
}