开发者

In page.tpl.php derive a field value from Profile

开发者 https://www.devze.com 2023-03-10 00:06 出处:网络
Prompt as in page.tpl.ph开发者_StackOverflowp derive a field value from the current user profile module. Field is called profile_first_nameIf you want to access profile field values from page.tpl.php

Prompt as in page.tpl.ph开发者_StackOverflowp derive a field value from the current user profile module. Field is called profile_first_name


If you want to access profile field values from page.tpl.php you could use profile_load_profile().

For example in your page.tpl.php add the following:

GLOBAL $user;
profile_load_profile($user);

Then to access the field you want (profile_first_name) you would use $user->profile_first_name

0

精彩评论

暂无评论...
验证码 换一张
取 消