我试图将user_profile_form插入页面。代码相当简单:Drupal 7,将user_profile_form插入页面
global $ user; module_load_include('inc','user','user.pages'); print drupal_render(drupal_get_form('user_profile_form',$ user,'account'));
一切正常除了当载图像,它显示了:
“警告:call_user_func_array()[function.call-用户FUNC阵列]:第一个参数是有望成为一种有效的回调, 'user_profile_form'在drupal_retrieve_form给予()”
任何想法,THX很多
要构建$ account变量,请使用以下代码 global $ user; $ account = user_build_content($ user); –
这是行不通的,但我得到:注意:试图获取user_account_form()中的非对象的属性(/var/www/modules/user/user.module的第1019行) –