I want to add logout button at the top of page.How I can achive this.
global $user; if ($user->uid) Logged in as: print l($user->name,'user/'.$user->uid); | print l("logout","logout");
global $user;
if ($user->uid)
print l($user->name,'user/'.$user->uid);
print l("logout","logout");
Comments
use the code on page.tpl.php for username and logout option
global $user;if ($user->uid)Logged in as:
print l($user->name,'user/'.$user->uid);|print l("logout","logout");