Customize drupal user login block
Log in to your drupal site as admin and then, go to administer -> block then go to tab add block to create new customize your drupal user login block.
On the block body paste this php code to create the new customize your drupal user login block:
<?php global $user; ?>
<?php if ($user->uid) : ?>
Welcome: <?php print l($user->name,'user/'.$user->uid); ?> |
<?php print l("logout","logout"); ?>
<?php else : ?>
For full access and to post messages and comments please Login/Register: <?php print l("Login/Register","user/login"); ?>
<?php endif; ?>
Make sure that you set the input format as php code
Then click the save button.
Â To enable the customs login block
Hit save block after you tick the enable checkbox to apply the changes.