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
52c0c18c
Commit
52c0c18c
authored
Jan 29, 2006
by
Dries
Browse files
- Patch
#46622
by Neil: more forgiving hook_user('view').
parent
15ff8c8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
52c0c18c
...
...
@@ -628,10 +628,15 @@ function theme_user_profile($account, $fields) {
$output
=
"<div class=
\"
profile
\"
>
\n
"
;
$output
.
=
theme
(
'user_picture'
,
$account
);
foreach
(
$fields
as
$category
=>
$items
)
{
$output
.
=
"<h2 class=
\"
title
\"
>
$category
</h2>
\n
"
;
if
(
strlen
(
$category
)
>
0
)
{
$output
.
=
'<h2 class="title">'
.
$category
.
"</h2>
\n
"
;
}
$output
.
=
'<dl>'
;
foreach
(
$items
as
$item
)
{
$output
.
=
sprintf
(
'<dt class="%s">%s:</dt><dd class="%s">%s</dd>'
,
$item
[
'class'
],
$item
[
'title'
],
$item
[
'class'
],
$item
[
'value'
]);
if
(
isset
(
$item
[
'title'
]))
{
$output
.
=
'<dt class="'
.
$item
[
'class'
]
.
'">'
.
$item
[
'title'
]
.
':</dt>'
;
}
$output
.
=
'<dd class="'
.
$item
[
'class'
]
.
'">'
.
$item
[
'value'
]
.
'</dd>'
;
}
$output
.
=
'</dl>'
;
}
...
...
modules/user/user.module
View file @
52c0c18c
...
...
@@ -628,10 +628,15 @@ function theme_user_profile($account, $fields) {
$output
=
"<div class=
\"
profile
\"
>
\n
"
;
$output
.
=
theme
(
'user_picture'
,
$account
);
foreach
(
$fields
as
$category
=>
$items
)
{
$output
.
=
"<h2 class=
\"
title
\"
>
$category
</h2>
\n
"
;
if
(
strlen
(
$category
)
>
0
)
{
$output
.
=
'<h2 class="title">'
.
$category
.
"</h2>
\n
"
;
}
$output
.
=
'<dl>'
;
foreach
(
$items
as
$item
)
{
$output
.
=
sprintf
(
'<dt class="%s">%s:</dt><dd class="%s">%s</dd>'
,
$item
[
'class'
],
$item
[
'title'
],
$item
[
'class'
],
$item
[
'value'
]);
if
(
isset
(
$item
[
'title'
]))
{
$output
.
=
'<dt class="'
.
$item
[
'class'
]
.
'">'
.
$item
[
'title'
]
.
':</dt>'
;
}
$output
.
=
'<dd class="'
.
$item
[
'class'
]
.
'">'
.
$item
[
'value'
]
.
'</dd>'
;
}
$output
.
=
'</dl>'
;
}
...
...
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