DrupalBin
Submit Code
About
Recent Posts
Serializable closures
Closures in menu item arguments
dpr($content['field_headshot'])
Fix for Git push error
Проверка
Code
$item['title'] = $item['title'];
Loading specific field
expire give non-aliased paths
Fix for Code
more
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Log in using OpenID
Cancel OpenID login
Create new account
Request new password
Tags
CCK
drupal
fapi
jquery
menu
module
php
simpletest
taxonomy
test
theme
views
more tags
Home
userreference
Use output of userreference field in profile as the default value for a userreference field in a node create form.
April 14, 2010 - 1:02pm — Anonymous
$user
=
user_load
(
array
(
'uid'
=>
$GLOBALS
[
'user'
]
->
uid
)
)
;
$sup
=
$user
->
field_profile_sup
;
$pattern
=
"|user/(\d+)|"
;
preg_match
(
$pattern
,
$sup
,
$matches
)
;
$sup_uid
=
$matches
[
1
]
;
return
array
(
CCK
userreference
Read more
Code
May 1, 2009 - 11:55am — Anonymous
function
hook_views_data
(
)
{
/* first attempt */
$data
=
array
(
)
;
$data
[
'byline'
]
[
'group'
]
=
t
(
'Byline'
)
;
$data
[
'byline'
]
[
'join'
]
[
'node'
]
=
array
(
api
CCK
textfield
userreference
views2
Read more