Drupal:我需要在 block 中显示用户名

标签 drupal drupal-6

是否有一个 Drupal 模块可以在登录时在 block 中显示用户名?

谢谢

最佳答案

  • 创建一个新 block 。
  • 格式:PHP代码

block 体:

<? 
global $user;
print $user->name;
?>

关于Drupal:我需要在 block 中显示用户名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3615830/

相关文章:

php - 在 Drupal 6 中以编程方式创建节点

drupal - Drush状态: unrecoverable error caused by drupal_goto() in hook_init()

html - 如何从 drupal 模块输出 HTML 的好方法

Drupal 和 PHP 5.3

php - 如何获取通过 drupal hook_menu 发送的多个参数

linux - 如何创建 cygwin 可执行文件

drupal - 请检查是否有白痴 : Customizing Taxonomy Term Page in Drupal

drupal - Docker和Drupal 8-settings.php

javascript - 我如何解决这个 "Cannot read property ' appendChild' of null"错误?

Drupal 7 浏览器特定的 css