I've found that whenever I'm logged in the log in box is gone and other than that there's no clue that I'm logged in. Is there a way to display a "welcome so and so" somewhere? Or a "Logged in: "?

Comments

Lioz’s picture

well i think login block works that way.
if you want to display a custom message after login you can try with some php code
here is an example


<?php global $user; ?>
<?php if ($user->uid) : ?>

<h3>
Hello, <span><?php print $user->name; ?> !</span></h3>

<?php
  if ($user->picture) {
    print '<img src="'.base_path().$user->picture.'" alt="avatar di '.$user->name.'" />'; 
  }
  else {
    print '<img src="'.base_path().'files/avatars/none.gif" />';
  }
?>


<a href="<?php print base_path().'user/'.$user->uid; ?>" title="modifica il tuo profilo!">Your profile</a><br />
<a href="<?php print base_path().'logout'; ?>" title="Esci dal Blog">Logout</a><br />


<?php else : ?>
<h3>
Anonymous User?</h3>

<p><a href="<?php print base_path().'user'; ?>">Please register or login</a></p>


<?php endif; ?>


aharown07’s picture

Hey, thanks! Will give it a try
Just one thing... where exactly should I put it? I'm still really new to php and Drupal.

aharown07’s picture

Status: Active » Closed (fixed)
aharown07’s picture

Here's another way. User the Persistent Login module and enable the option to display the welcome. Works nicely and you can style the "welcome..." in style.css

I wanted persistent login anyway, so went that route.

jhoomjp’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

Hi,

I am not able to see Logout button after switching to this theme, can you please help me out, like what is wrong done by me or some bug?

Lioz’s picture

Status: Active » Closed (won't fix)