Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a6085365
Commit
a6085365
authored
May 16, 2011
by
Dries
Browse files
- Patch
#1158730
by TR: documentation problem with hook_user_load().
parent
980155ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.api.php
View file @
a6085365
...
...
@@ -24,9 +24,9 @@
* @see profile_user_load()
*/
function
hook_user_load
(
$users
)
{
$result
=
db_query
(
'SELECT
*
FROM {my_table} WHERE uid IN (:uids)'
,
array
(
':uids'
=>
array_keys
(
$users
)));
$result
=
db_query
(
'SELECT
uid, foo
FROM {my_table} WHERE uid IN (:uids)'
,
array
(
':uids'
=>
array_keys
(
$users
)));
foreach
(
$result
as
$record
)
{
$users
[
$record
->
uid
]
->
foo
=
$re
sult
->
foo
;
$users
[
$record
->
uid
]
->
foo
=
$re
cord
->
foo
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment