php - 如何访问 SuiteCRM 中 .tpl 文件中的全局变量 $current_user

标签 php sugarcrm suitecrm

如何访问 .tpl 文件内的 $current_user 全局变量?我需要用它自定义 View 的某些部分。

最佳答案

{php}

 global $current_user;
    $this->_tpl_vars['current_user_email'] = $current_user->email1;

{/php}

现在,在 tpl 文件中为当前用户使用 $current_user_email 变量。

关于php - 如何访问 SuiteCRM 中 .tpl 文件中的全局变量 $current_user,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44885932/

相关文章:

php - 正则表达式 - 从 PHP 中的 html 字符串获取表格

java - SugarCRM 自定义字段

php - 仅当 $bean->status 更改时逻辑钩子(Hook)才会触发

php - 从 mysql 创建 xml 文件

php - 更改 PDF 文件中的内容

mysql - 根据用户id统计出现次数

php - 在 Sugarcrm 中将联系人添加到目标列表时如何更新数据库

php - 在 Windows 7 中的 wamp 上安装 SuiteCRM 时出错

javascript - 我可以使用 nextUntil 来获取这些值吗?

mysql 多个连接在同一个表上