【问题标题】:How to print profile id associated with the user in Drupal?如何在 Drupal 中打印与用户关联的配置文件 ID?
【发布时间】:2011-09-08 21:12:05
【问题描述】:

我需要打印登录用户的配置文件 ID (pid)。用户 id 和配置文件 id 是不同的数字,但它们在数据库的配置文件表中是相关的。知道我该怎么做吗?

【问题讨论】:

  • 既然是 Drupal 7,这是配置文件还是配置文件 2?

标签: drupal drupal-7 profile


【解决方案1】:

一种方法是使用 profile2_load_by_user($account, $type_name = NULL)。在最坏的情况下,您始终可以从数据库中进行 db_query。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-23
    相关资源
    最近更新 更多