Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
realname
Commits
f9258da5
Commit
f9258da5
authored
Feb 10, 2011
by
Dave Reid
Browse files
#1057548 by Dave Reid: Prevent errors if user_load() was not successful.
parent
af5b14aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
realname.module
realname.module
+4
-5
No files found.
realname.module
View file @
f9258da5
...
...
@@ -67,12 +67,11 @@ function realname_username_alter(&$name, $account) {
$in_username_alter
=
TRUE
;
// If $account->realname was undefined, then the user account object was
// likely not properly loaded.
$realname_account
=
user_load
(
$account
->
uid
);
if
(
$realname
=
realname_load
(
$realname_account
))
{
$name
=
$realname
;
// not properly loaded. We must enforce calling user_load().
if
(
$realname_account
=
user_load
(
$account
->
uid
))
{
realname_username_alter
(
$name
,
$realname_account
);
}
$in_username_alter
=
FALSE
;
}
}
...
...
Write
Preview
Markdown
is supported
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