In my 1.0 installation I added a text link in my template which shows 'sign in' to redirect the user to a login page. After the user logged in, the text link changed in 'sign out' and the name of the user was shown after the link. It worked perfect with this code:
Code: Select all
<?php if( $my->id )
{
echo '<a class="login" href="index.php?option=com_login&Itemid=848&action=logout">sign out</a>';
} else {
echo '<a class="login" href="index.php?option=com_login&Itemid=847&action=login">sign in</a>';
}
?>
<?php if ( $my->id ) { echo $my->name; } ?>
Does anybody know why and how to solve it?
Many tnx!