Drupal检查用户登录
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Drupal检查用户登录相关的知识,希望对你有一定的参考价值。
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.
<?php global $user; if (!$user->uid) { ?> <div id="register-button"> <p><a href="/user/register">Click Here to Register</a></p> </div> <?php } ?>
以上是关于Drupal检查用户登录的主要内容,如果未能解决你的问题,请参考以下文章