Vi ste ovdje

You are logged in as, User or Login | Register (D7)

Drupal 7
Just put this code anywhere you want in teplate file (+.tpl.php) or in the block with PHP input format (PHP Filter module should be enabled).
<?php
global $user;
if (
$user->uid) {
print
t('You are logged in as, !username | !logout', array(
   
'!username' => theme('username', array('account' => $user)),
   
'!logout' => l(t('Logout'), 'user/logout'),
    ));
}
else {
 
$dest = drupal_get_destination();
  print
l(t('Login'),'user/login', array(
     
'query' => $dest,
    )
  );

 

// Print Register link only if allowed to do so.
 
if (variable_get('user_register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)) {
    print
' | ';
    print
l(t('Register'),'user/register', array(
       
'query' => $dest,
      )
    );
  }
}
?>