Posted By

shrop on 05/29/08


Tagged

drupal


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

1 person has marked this snippet as a favorite

DanS42


Drupal Check for User Login


Published in: PHP 






I use this code to place in blocks or pages to show a link to the user registration page if the user is not currently logged in. An example is a block I have setup on the home page of http://www.lightentheload.net. If the user is logged in, the block goes away.

Expand | Embed | Plain Text
  1. <?php
  2. global $user;
  3. if (!$user->uid) {
  4. ?>
  5. <div id="register-button">
  6. <p><a href="/user/register">Click Here to Register</a></p>
  7. </div>
  8. <?php
  9. }
  10. ?>

Report this snippet 

You need to login to post a comment.

Download royalty free graphics